fix bug on light page #2

This commit is contained in:
Johannes Braun
2022-03-12 19:49:58 +01:00
parent c93ad3ce13
commit 72f9af1175
5 changed files with 13 additions and 7 deletions

View File

@@ -451,7 +451,11 @@ class NsPanelLovelanceUI:
if "color_temp" in entity.attributes:
# scale ha color temp range to 0-100
color_temp = int(self.scale(entity.attributes.color_temp,(entity.attributes.min_mireds, entity.attributes.max_mireds),(0,100)))
else:
color_temp = 0
else:
color_temp = "disable"
if "xy" in entity.attributes.supported_color_modes:
color = "enable"
else: