Fix input_boolean and switch

This commit is contained in:
Johannes
2022-03-21 21:38:51 +01:00
committed by GitHub
parent 20c02007fa
commit cec43eeb16

View File

@@ -509,8 +509,9 @@ class NsPanelLovelaceUI:
if item_type == "switch" or item_type == "input_boolean": if item_type == "switch" or item_type == "input_boolean":
switch_val = 1 if entity.state == "on" else 0 switch_val = 1 if entity.state == "on" else 0
icon_id = get_icon_id("flash") icon_id = get_icon_id('flash') if icon is None else get_icon_id(icon)
icon_color = self.getEntityColor(entity) icon_color = self.getEntityColor(entity)
if item_type == "input_boolean": if item_type == "input_boolean":
if switch_val == 1: if switch_val == 1:
icon_id = get_icon_id("check-circle-outline") icon_id = get_icon_id("check-circle-outline")