diff --git a/HMI/US/landscape/nspanel_US_L.HMI b/HMI/US/landscape/nspanel_US_L.HMI index fcb00bb4..95a7a2f2 100644 Binary files a/HMI/US/landscape/nspanel_US_L.HMI and b/HMI/US/landscape/nspanel_US_L.HMI differ diff --git a/HMI/US/landscape/nspanel_US_L.tft b/HMI/US/landscape/nspanel_US_L.tft index bcdf4092..90da4d41 100644 Binary files a/HMI/US/landscape/nspanel_US_L.tft and b/HMI/US/landscape/nspanel_US_L.tft differ diff --git a/HMI/US/portrait/nspanel_US_P.HMI b/HMI/US/portrait/nspanel_US_P.HMI index 9d3df5ba..a1206c6e 100644 Binary files a/HMI/US/portrait/nspanel_US_P.HMI and b/HMI/US/portrait/nspanel_US_P.HMI differ diff --git a/HMI/US/portrait/nspanel_US_P.tft b/HMI/US/portrait/nspanel_US_P.tft index ea8bb320..b57f63f3 100644 Binary files a/HMI/US/portrait/nspanel_US_P.tft and b/HMI/US/portrait/nspanel_US_P.tft differ diff --git a/HMI/code_gen/pages/cardEntitiesSerial.py b/HMI/code_gen/pages/cardEntitiesSerial.py index 9efc0e0b..d79ca13a 100644 --- a/HMI/code_gen/pages/cardEntitiesSerial.py +++ b/HMI/code_gen/pages/cardEntitiesSerial.py @@ -125,7 +125,7 @@ for i in range(1,5): // get Text (optional Value) spstr strCommand.txt,bText{i}.txt,"~",{idxstart+5} }} - if(type{i}.txt=="button") + if(type{i}.txt=="button"||type{i}.txt=="input_sel") {{ vis bUp{i},0 vis bStop{i},0 diff --git a/HMI/nspanel.HMI b/HMI/nspanel.HMI index 7f744c27..b2dc8c22 100644 Binary files a/HMI/nspanel.HMI and b/HMI/nspanel.HMI differ diff --git a/HMI/nspanel.tft b/HMI/nspanel.tft index 755e79c5..6104dfb6 100644 Binary files a/HMI/nspanel.tft and b/HMI/nspanel.tft differ diff --git a/apps/nspanel-lovelace-ui/luibackend/controller.py b/apps/nspanel-lovelace-ui/luibackend/controller.py index 4155e9ca..c3dc6d94 100644 --- a/apps/nspanel-lovelace-ui/luibackend/controller.py +++ b/apps/nspanel-lovelace-ui/luibackend/controller.py @@ -169,6 +169,8 @@ class LuiController(object): self._pages_gen.generate_shutter_detail_page(entity) if entity.startswith("fan"): self._pages_gen.generate_fan_detail_page(entity) + if entity.startswith("input_select"): + self._pages_gen.generate_input_select_detail_page(entity) if self._current_card.cardType == "cardThermo": if entity.startswith("climate"): self._pages_gen.generate_thermo_detail_page(entity) @@ -183,6 +185,8 @@ class LuiController(object): self._pages_gen.generate_fan_detail_page(entity_id) if detail_type == "popupThermo": self._pages_gen.generate_thermo_detail_page(entity_id) + if detail_type == "popupInSel": + self._pages_gen.generate_input_select_detail_page(entity_id) def button_press(self, entity_id, button_type, value): apis.ha_api.log(f"Button Press Event; entity_id: {entity_id}; button_type: {button_type}; value: {value} ") diff --git a/apps/nspanel-lovelace-ui/luibackend/pages.py b/apps/nspanel-lovelace-ui/luibackend/pages.py index 02540fc0..529cda70 100644 --- a/apps/nspanel-lovelace-ui/luibackend/pages.py +++ b/apps/nspanel-lovelace-ui/luibackend/pages.py @@ -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")