mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-20 22:47:01 +01:00
.
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user