mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2026-02-22 22:18:38 +01:00
add popup page for input_select
This commit is contained in:
@@ -342,7 +342,7 @@ class LuiPagesGen(object):
|
||||
entityTypePanel = "text"
|
||||
value = entity.state
|
||||
elif entityType == "input_select":
|
||||
entityTypePanel = "button"
|
||||
entityTypePanel = "input_sel"
|
||||
value = entity.state
|
||||
elif entityType == "vacuum":
|
||||
entityTypePanel = "button"
|
||||
@@ -803,6 +803,15 @@ class LuiPagesGen(object):
|
||||
|
||||
self._send_mqtt_msg(f"entityUpdateDetail~{entity_id}~{icon_id}~{icon_color}~{modes_out}")
|
||||
|
||||
def generate_input_select_detail_page(self, entity_id):
|
||||
entity = apis.ha_api.get_entity(entity_id)
|
||||
icon_color = self.get_entity_color(entity, ha_type="input_select")
|
||||
|
||||
options = entity.attributes.get("options", [])
|
||||
options = "?".join(options)
|
||||
|
||||
self._send_mqtt_msg(f"entityUpdateDetail~{entity_id}~~{icon_color}~input_select~{entity.state}~{options}~")
|
||||
|
||||
def send_message_page(self, ident, heading, msg, b1, b2):
|
||||
self._send_mqtt_msg(f"pageType~popupNotify")
|
||||
self._send_mqtt_msg(f"entityUpdateDetail~{ident}~{heading}~65535~{b1}~65535~{b2}~65535~{msg}~65535~0")
|
||||
|
||||
Reference in New Issue
Block a user