diff --git a/HMI/nspanel.HMI b/HMI/nspanel.HMI index ae9f4b59..08e25dcb 100644 Binary files a/HMI/nspanel.HMI and b/HMI/nspanel.HMI differ diff --git a/HMI/nspanel.tft b/HMI/nspanel.tft index 5309e674..61de2e1c 100644 Binary files a/HMI/nspanel.tft and b/HMI/nspanel.tft differ diff --git a/nspanel-lovelace-ui/config.yaml b/nspanel-lovelace-ui/config.yaml index 7353c7d1..2bc898bd 100644 --- a/nspanel-lovelace-ui/config.yaml +++ b/nspanel-lovelace-ui/config.yaml @@ -1,6 +1,6 @@ # https://developers.home-assistant.io/docs/add-ons/configuration#add-on-config name: NSPanel Lovelace UI Addon -version: "4.7.35" +version: "4.7.36" slug: nspanel-lovelace-ui description: NSPanel Lovelace UI Addon services: diff --git a/nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/libs/icon_mapping.py b/nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/libs/icon_mapping.py index 07870bfa..044580d4 100644 --- a/nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/libs/icon_mapping.py +++ b/nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/libs/icon_mapping.py @@ -6914,7 +6914,6 @@ def get_icon_id(ma_name): ma_name = re.sub(r'.+?<\/I>', get_icon_id, ma_name) print(f"test123d {ma_name}") - ma_name = ma_name.replace("mdi:", "") if ma_name in icons: return icons[ma_name] diff --git a/nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/libs/panel_cmd.py b/nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/libs/panel_cmd.py index 631273c0..600bd6f6 100644 --- a/nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/libs/panel_cmd.py +++ b/nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/libs/panel_cmd.py @@ -8,7 +8,7 @@ def init(mqtt_client_from_manager): def custom_send(topic, msg): global mqtt_client mqtt_client.publish(topic, msg) - logging.debug("Sent Message to NsPanel: %s", msg) + logging.debug("Sent Message to NsPanel (%s): %s", topic, msg) def page_type(topic, target_page): diff --git a/nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/panel.py b/nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/panel.py index 6db9f2e9..3c796f64 100644 --- a/nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/panel.py +++ b/nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/panel.py @@ -122,11 +122,11 @@ class LovelaceUIPanel: self.dimmode() - def render_current_page(self, switchPages=False): + def render_current_page(self, switchPages=False, requested=False): if switchPages: libs.panel_cmd.page_type(self.sendTopic, self.current_card.type) - - self.current_card.render() + if requested: + self.current_card.render() # send sleepTimeout sleepTimeout = self.settings.get("sleepTimeout", 20) if self.current_card.config.get("sleepTimeout"): @@ -155,7 +155,7 @@ class LovelaceUIPanel: def customrecv_event_callback(self, msg): - logging.debug("Recv Message from NsPanel: %s", msg) + logging.debug("Recv Message from NsPanel (%s): %s", self.name, msg) msg = msg.split(",") # run action based on received command if msg[0] == "event": @@ -173,6 +173,8 @@ class LovelaceUIPanel: self.privious_cards.append(self.current_card) self.current_card = Screensaver(self.settings["locale"], self.settings["screensaver"], self) self.render_current_page(switchPages=True) + if msg[1] == "renderCurrentPage": + self.render_current_page(requested=True) if msg[1] == "buttonPress2": entity_id = msg[2] btype = msg[3]