diff --git a/HMI/code_gen/pages/cardEntitiesSerial.py b/HMI/code_gen/pages/cardEntitiesSerial.py index 23155670..b1234e94 100644 --- a/HMI/code_gen/pages/cardEntitiesSerial.py +++ b/HMI/code_gen/pages/cardEntitiesSerial.py @@ -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 }} }} diff --git a/HMI/nspanel.HMI b/HMI/nspanel.HMI index ff5a6803..d8122828 100644 Binary files a/HMI/nspanel.HMI and b/HMI/nspanel.HMI differ diff --git a/HMI/nspanel.tft b/HMI/nspanel.tft index c8f9649d..faa3fdf5 100644 Binary files a/HMI/nspanel.tft and b/HMI/nspanel.tft differ diff --git a/apps/nspanel-lovelace-ui/luibackend/pages.py b/apps/nspanel-lovelace-ui/luibackend/pages.py index c8b67040..a0123561 100644 --- a/apps/nspanel-lovelace-ui/luibackend/pages.py +++ b/apps/nspanel-lovelace-ui/luibackend/pages.py @@ -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)