From 975d37c56258ccf8df5ee0d0ff582263f5cd879b Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Fri, 29 Apr 2022 23:29:04 +0200 Subject: [PATCH] Added relevant attributes to `light` entities --- platypush/entities/lights.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/platypush/entities/lights.py b/platypush/entities/lights.py index b8fa26f3a..8e98049f7 100644 --- a/platypush/entities/lights.py +++ b/platypush/entities/lights.py @@ -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__,