platypush/platypush/entities/lights.py

21 lines
419 B
Python

from sqlalchemy import Column, Integer, ForeignKey
from .devices import Device
class Light(Device):
__tablename__ = 'light'
id = Column(Integer, ForeignKey(Device.id), primary_key=True)
__mapper_args__ = {
'polymorphic_identity': __tablename__,
}
@property
def _meta(self):
return {
**super()._meta,
'icon_class': 'fa-solid fa-lightbulb',
}