diff --git a/nspanel-lovelace-ui/config.yaml b/nspanel-lovelace-ui/config.yaml index d5b30439..c2e685c1 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.69" +version: "4.7.70" slug: nspanel-lovelace-ui description: NSPanel Lovelace UI Addon services: diff --git a/nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/ha_control.py b/nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/ha_control.py index b84052bd..adf112b6 100644 --- a/nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/ha_control.py +++ b/nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/ha_control.py @@ -51,7 +51,7 @@ def calculate_dim_values(sleepTracking, sleepTrackingZones, sleepBrightness, scr else: return dimmode, dimValueNormal -def handle_buttons(entity_id, btype, value, entity_config): +def handle_buttons(entity_id, btype, value, entity_config=None): match btype: case 'button': button_press(entity_id, value) 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 5952ec06..8c9f4809 100644 --- a/nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/panel.py +++ b/nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/panel.py @@ -271,7 +271,7 @@ class LovelaceUIPanel: self.render_current_page(switchPages=True) # send ha stuff to ha case _: - ha_control.handle_buttons(entity_id, btype, value, entity_config) + ha_control.handle_buttons(entity_id, btype, value, entity_config=entity_config) case 'cardUnlock-unlock': card_iid = entity_id.split(".")[1] if int(self.current_card.config.get("pin")) == int(value): @@ -279,7 +279,7 @@ class LovelaceUIPanel: self.current_card = self.searchCard(card_iid) self.render_current_page(switchPages=True) case _: - ha_control.handle_buttons(entity_id, btype, value, entity_config) + ha_control.handle_buttons(entity_id, btype, value) if msg[1] == "pageOpenDetail": entity_id = msg[3]