Support units on dimmer entities

This commit is contained in:
Fabio Manganiello 2023-01-09 01:01:05 +01:00
parent 32330ca7a8
commit e9c84ff5d4
Signed by: blacklight
GPG Key ID: D90FBA7F76362774
1 changed files with 2 additions and 1 deletions

View File

@ -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__,