mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2026-02-14 00:48:17 +01:00
Update pages.py
This commit is contained in:
@@ -545,7 +545,7 @@ class LuiPagesGen(object):
|
|||||||
def generate_alarm_page(self, navigation, entity, overwrite_supported_modes, alarmBtn):
|
def generate_alarm_page(self, navigation, entity, overwrite_supported_modes, alarmBtn):
|
||||||
item = entity.entityId
|
item = entity.entityId
|
||||||
if not apis.ha_api.entity_exists(item):
|
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:
|
else:
|
||||||
entity = apis.ha_api.get_entity(item)
|
entity = apis.ha_api.get_entity(item)
|
||||||
icon = get_icon_id("shield-off")
|
icon = get_icon_id("shield-off")
|
||||||
@@ -616,7 +616,7 @@ class LuiPagesGen(object):
|
|||||||
arm_buttons += f"~{get_translation(self._locale, modeName)}~{b}"
|
arm_buttons += f"~{get_translation(self._locale, modeName)}~{b}"
|
||||||
if len(supported_modes) < 4:
|
if len(supported_modes) < 4:
|
||||||
arm_buttons += "~"*((4-len(supported_modes))*2)
|
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)
|
self._send_mqtt_msg(command)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user