forked from platypush/platypush
Added relevant attributes to light
entities
This commit is contained in:
parent
90f067de61
commit
975d37c562
1 changed files with 7 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
from sqlalchemy import Column, Integer, ForeignKey
|
||||
from sqlalchemy import Column, Integer, String, ForeignKey, Boolean, Float
|
||||
|
||||
from .devices import Device
|
||||
|
||||
|
@ -7,6 +7,12 @@ class Light(Device):
|
|||
__tablename__ = 'light'
|
||||
|
||||
id = Column(Integer, ForeignKey(Device.id, ondelete='CASCADE'), primary_key=True)
|
||||
on = Column(Boolean)
|
||||
brightness = Column(Float)
|
||||
saturation = Column(Float)
|
||||
hue = Column(Float)
|
||||
temperature = Column(Float)
|
||||
colormode = Column(String)
|
||||
|
||||
__mapper_args__ = {
|
||||
'polymorphic_identity': __tablename__,
|
||||
|
|
Loading…
Reference in a new issue