From e9c84ff5d494ec471632747320e3260a0baf2ea4 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Mon, 9 Jan 2023 01:01:05 +0100 Subject: [PATCH] Support units on dimmer entities --- platypush/entities/dimmers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platypush/entities/dimmers.py b/platypush/entities/dimmers.py index 16e137f37..c977b0643 100644 --- a/platypush/entities/dimmers.py +++ b/platypush/entities/dimmers.py @@ -1,4 +1,4 @@ -from sqlalchemy import Column, Integer, ForeignKey, Float +from sqlalchemy import Column, Integer, ForeignKey, Float, String from platypush.common.db import Base @@ -17,6 +17,7 @@ if 'dimmer' not in Base.metadata: max = Column(Float) step = Column(Float, default=1.0) value = Column(Float) + unit = Column(String) __mapper_args__ = { 'polymorphic_identity': __tablename__,