This commit is contained in:
joBr99
2022-05-23 17:58:40 +02:00
parent 73d708c2e2
commit 8884ca69d3
2 changed files with 2 additions and 2 deletions

View File

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