mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-21 15:04:24 +01:00
implemented #196
This commit is contained in:
@@ -53,23 +53,23 @@ for i in range(1,5):
|
|||||||
spstr tId.txt,tTmp.txt,"|",0
|
spstr tId.txt,tTmp.txt,"|",0
|
||||||
if(tTmp.txt=="0")
|
if(tTmp.txt=="0")
|
||||||
{{
|
{{
|
||||||
bUp{i}.bco2=27501
|
bUp{i}.pco=27501
|
||||||
tsw bUp{i},0
|
tsw bUp{i},0
|
||||||
}}
|
}}
|
||||||
else
|
else
|
||||||
{{
|
{{
|
||||||
bUp{i}.bco2=14823
|
bUp{i}.pco=65535
|
||||||
tsw bUp{i},1
|
tsw bUp{i},1
|
||||||
}}
|
}}
|
||||||
spstr tId.txt,tTmp.txt,"|",1
|
spstr tId.txt,tTmp.txt,"|",1
|
||||||
if(tTmp.txt=="0")
|
if(tTmp.txt=="0")
|
||||||
{{
|
{{
|
||||||
bDown{i}.bco2=27501
|
bDown{i}.pco=27501
|
||||||
tsw bDown{i},0
|
tsw bDown{i},0
|
||||||
}}
|
}}
|
||||||
else
|
else
|
||||||
{{
|
{{
|
||||||
bDown{i}.bco2=14823
|
bDown{i}.pco=65535
|
||||||
tsw bDown{i},1
|
tsw bDown{i},1
|
||||||
}}
|
}}
|
||||||
}}
|
}}
|
||||||
|
|||||||
BIN
HMI/nspanel.HMI
BIN
HMI/nspanel.HMI
Binary file not shown.
BIN
HMI/nspanel.tft
BIN
HMI/nspanel.tft
Binary file not shown.
@@ -144,7 +144,14 @@ class LuiPagesGen(object):
|
|||||||
name = name if name is not None else entity.attributes.friendly_name
|
name = name if name is not None else entity.attributes.friendly_name
|
||||||
if entityType == "cover":
|
if entityType == "cover":
|
||||||
icon_id = get_icon_id_ha("cover", state=entity.state, overwrite=icon)
|
icon_id = get_icon_id_ha("cover", state=entity.state, overwrite=icon)
|
||||||
return f"~shutter~{entityId}~{icon_id}~17299~{name}~"
|
pos = int(entity.attributes.get("current_position", 50))
|
||||||
|
if pos == 100:
|
||||||
|
status = "0|1"
|
||||||
|
elif pos == 0
|
||||||
|
status = "1|0"
|
||||||
|
else:
|
||||||
|
status = "1|1"
|
||||||
|
return f"~shutter~{entityId}~{icon_id}~17299~{name}~{status}"
|
||||||
if entityType in "light":
|
if entityType in "light":
|
||||||
switch_val = 1 if entity.state == "on" else 0
|
switch_val = 1 if entity.state == "on" else 0
|
||||||
icon_color = self.get_entity_color(entity)
|
icon_color = self.get_entity_color(entity)
|
||||||
|
|||||||
Reference in New Issue
Block a user