Update pages.py

This commit is contained in:
joBr99
2023-01-12 22:18:07 +01:00
committed by GitHub
parent 9875e87cd7
commit bb5f2286e7

View File

@@ -545,7 +545,7 @@ class LuiPagesGen(object):
def generate_alarm_page(self, navigation, entity, overwrite_supported_modes, alarmBtn):
item = entity.entityId
if not apis.ha_api.entity_exists(item):
command = f"entityUpd~{item}~{navigation}~Not found~Not found~Check your~Check your~apps.~apps.~yaml~yaml~0~~0"
command = f"entityUpd~Not found~{navigation}~{item}~Not found~Not found~Check your~Check your~apps.~apps.~yaml~yaml~0~~0"
else:
entity = apis.ha_api.get_entity(item)
icon = get_icon_id("shield-off")
@@ -616,7 +616,7 @@ class LuiPagesGen(object):
arm_buttons += f"~{get_translation(self._locale, modeName)}~{b}"
if len(supported_modes) < 4:
arm_buttons += "~"*((4-len(supported_modes))*2)
command = f"entityUpd~{item}~{navigation}{arm_buttons}~{icon}~{color}~{numpad}~{flashing}~{add_btn}"
command = f"entityUpd~{title}~{navigation}~{item}{arm_buttons}~{icon}~{color}~{numpad}~{flashing}~{add_btn}"
self._send_mqtt_msg(command)