add state to icon overwrite for light

This commit is contained in:
joBr99
2022-06-13 12:14:58 +02:00
committed by GitHub
parent b0b9c3fbf8
commit d5e47ed381

View File

@@ -222,7 +222,7 @@ class LuiPagesGen(object):
if entityType in "light":
switch_val = 1 if entity.state == "on" else 0
icon_color = self.get_entity_color(entity, overwrite=colorOverride)
icon_id = get_icon_id_ha("light", overwrite=icon)
icon_id = get_icon_id_ha("light", state=entity.state, overwrite=icon)
return f"~{entityType}~{entityId}~{icon_id}~{icon_color}~{name}~{switch_val}"
if entityType in ["switch", "input_boolean", "automation"]:
switch_val = 1 if entity.state == "on" else 0