mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2026-02-11 07:46:33 +01:00
added flashing
This commit is contained in:
BIN
HMI/nspanel.HMI
BIN
HMI/nspanel.HMI
Binary file not shown.
BIN
HMI/nspanel.tft
BIN
HMI/nspanel.tft
Binary file not shown.
@@ -292,12 +292,15 @@ class LuiPagesGen(object):
|
|||||||
color = rgb_dec565([223,76,30])
|
color = rgb_dec565([223,76,30])
|
||||||
icon = get_icon_id("shield-airplane")
|
icon = get_icon_id("shield-airplane")
|
||||||
|
|
||||||
|
flashing = "disable"
|
||||||
if entity.state in ["arming", "pending"]:
|
if entity.state in ["arming", "pending"]:
|
||||||
color = rgb_dec565([243,179,0])
|
color = rgb_dec565([243,179,0])
|
||||||
icon = get_icon_id("shield")
|
icon = get_icon_id("shield")
|
||||||
|
flashing = "enable"
|
||||||
if entity.state == "triggered":
|
if entity.state == "triggered":
|
||||||
color = rgb_dec565([223,76,30])
|
color = rgb_dec565([223,76,30])
|
||||||
icon = get_icon_id("bell-ring")
|
icon = get_icon_id("bell-ring")
|
||||||
|
flashing = "enable"
|
||||||
|
|
||||||
# add padding to arm buttons
|
# add padding to arm buttons
|
||||||
arm_buttons = ""
|
arm_buttons = ""
|
||||||
@@ -305,7 +308,7 @@ class LuiPagesGen(object):
|
|||||||
arm_buttons += f",{get_translation(self._locale, b)},{b}"
|
arm_buttons += f",{get_translation(self._locale, b)},{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}{arm_buttons},{icon},{color},{numpad}"
|
command = f"entityUpd,{item}{arm_buttons},{icon},{color},{numpad},{flashing}"
|
||||||
self._send_mqtt_msg(command)
|
self._send_mqtt_msg(command)
|
||||||
|
|
||||||
def render_page(self, page, send_page_type=True):
|
def render_page(self, page, send_page_type=True):
|
||||||
|
|||||||
Reference in New Issue
Block a user