mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2026-02-26 06:02:14 +01:00
fixes #73
This commit is contained in:
@@ -132,10 +132,11 @@ class LuiPagesGen(object):
|
||||
return f",text,{item},{icon_id},{icon_color},{name},{value}"
|
||||
if item_type in ["button", "input_button"]:
|
||||
icon_id = get_icon_id_ha("button", overwrite=icon)
|
||||
return f",button,{item},{icon_id},17299,{name},PRESS"
|
||||
text = get_translation(self._locale,"PRESS")
|
||||
return f",button,{item},{icon_id},17299,{name},{text}"
|
||||
if item_type == "scene":
|
||||
icon_id = get_icon_id_ha("scene", overwrite=icon)
|
||||
text = get_translation(self._locale,"PRESS")
|
||||
text = get_translation(self._locale,"ACTIVATE")
|
||||
return f",button,{item},{icon_id},17299,{name},{text}"
|
||||
|
||||
|
||||
@@ -158,6 +159,7 @@ class LuiPagesGen(object):
|
||||
current_temp = int(entity.attributes.get("current_temperature", 0)*10)
|
||||
dest_temp = int(entity.attributes.get("temperature", 0)*10)
|
||||
status = entity.attributes.get("hvac_action", "")
|
||||
status = get_translation(self._locale,status)
|
||||
min_temp = int(entity.attributes.get("min_temp", 0)*10)
|
||||
max_temp = int(entity.attributes.get("max_temp", 0)*10)
|
||||
step_temp = int(entity.attributes.get("target_temp_step", 0.5)*10)
|
||||
@@ -274,4 +276,4 @@ class LuiPagesGen(object):
|
||||
|
||||
def send_message_page(self, id, heading, msg, b1, b2):
|
||||
self._send_mqtt_msg(f"pageType,popupNotify")
|
||||
self._send_mqtt_msg(f"entityUpdateDetail,|{id}|{heading}|65535|{b1}|65535|{b2}|65535|{msg}|65535|0")
|
||||
self._send_mqtt_msg(f"entityUpdateDetail,|{id}|{heading}|65535|{b1}|65535|{b2}|65535|{msg}|65535|0")
|
||||
|
||||
Reference in New Issue
Block a user