This commit is contained in:
joBr99
2023-12-02 14:23:43 +01:00
parent dfba3b6e84
commit adcb618a11
3 changed files with 4 additions and 4 deletions

View File

@@ -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:

View File

@@ -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)

View File

@@ -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]