mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2026-02-10 07:16:34 +01:00
fix icon for switches
This commit is contained in:
@@ -391,10 +391,12 @@ 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 = 4
|
icon_id = 4
|
||||||
if item_type == "input_boolean" and switch_val == 1:
|
self.api.log("test_test: %s", item_type)
|
||||||
icon_id = 6
|
if item_type == "input_boolean":
|
||||||
else:
|
if switch_val == 1:
|
||||||
icon_id = 7
|
icon_id = 6
|
||||||
|
else:
|
||||||
|
icon_id = 7
|
||||||
|
|
||||||
return f",switch,{item},{icon_id},17299,{name},{switch_val}"
|
return f",switch,{item},{icon_id},17299,{name},{switch_val}"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user