implemented #196

This commit is contained in:
Johannes
2022-05-21 13:46:19 +02:00
parent ce99692644
commit d6424c9ec3
4 changed files with 12 additions and 5 deletions

View File

@@ -53,23 +53,23 @@ for i in range(1,5):
spstr tId.txt,tTmp.txt,"|",0
if(tTmp.txt=="0")
{{
bUp{i}.bco2=27501
bUp{i}.pco=27501
tsw bUp{i},0
}}
else
{{
bUp{i}.bco2=14823
bUp{i}.pco=65535
tsw bUp{i},1
}}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
{{
bDown{i}.bco2=27501
bDown{i}.pco=27501
tsw bDown{i},0
}}
else
{{
bDown{i}.bco2=14823
bDown{i}.pco=65535
tsw bDown{i},1
}}
}}

Binary file not shown.

Binary file not shown.

View File

@@ -144,7 +144,14 @@ class LuiPagesGen(object):
name = name if name is not None else entity.attributes.friendly_name
if entityType == "cover":
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":
switch_val = 1 if entity.state == "on" else 0
icon_color = self.get_entity_color(entity)