fix input_boolean icon

This commit is contained in:
Johannes Braun
2022-03-23 09:37:00 +01:00
parent a725305cd4
commit 9ac5c8d748

View File

@@ -462,7 +462,7 @@ class LovelaceUIPanel:
return f",{item_type},{item},{icon_id},{icon_color},{name},{switch_val}"
if item_type == "switch" or item_type == "input_boolean":
icon_id = get_icon_id_ha(item_type, overwrite=icon)
icon_id = get_icon_id_ha(item_type, state=entity.state, overwrite=icon)
switch_val = 1 if entity.state == "on" else 0
icon_color = self.getEntityColor(entity)
return f",switch,{item},{icon_id},{icon_color},{name},{switch_val}"