mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-21 06:54:24 +01:00
.
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
# https://developers.home-assistant.io/docs/add-ons/configuration#add-on-config
|
# https://developers.home-assistant.io/docs/add-ons/configuration#add-on-config
|
||||||
name: NSPanel Lovelace UI Addon
|
name: NSPanel Lovelace UI Addon
|
||||||
version: "4.7.69"
|
version: "4.7.70"
|
||||||
slug: nspanel-lovelace-ui
|
slug: nspanel-lovelace-ui
|
||||||
description: NSPanel Lovelace UI Addon
|
description: NSPanel Lovelace UI Addon
|
||||||
services:
|
services:
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ def calculate_dim_values(sleepTracking, sleepTrackingZones, sleepBrightness, scr
|
|||||||
else:
|
else:
|
||||||
return dimmode, dimValueNormal
|
return dimmode, dimValueNormal
|
||||||
|
|
||||||
def handle_buttons(entity_id, btype, value, entity_config):
|
def handle_buttons(entity_id, btype, value, entity_config=None):
|
||||||
match btype:
|
match btype:
|
||||||
case 'button':
|
case 'button':
|
||||||
button_press(entity_id, value)
|
button_press(entity_id, value)
|
||||||
|
|||||||
@@ -271,7 +271,7 @@ class LovelaceUIPanel:
|
|||||||
self.render_current_page(switchPages=True)
|
self.render_current_page(switchPages=True)
|
||||||
# send ha stuff to ha
|
# send ha stuff to ha
|
||||||
case _:
|
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':
|
case 'cardUnlock-unlock':
|
||||||
card_iid = entity_id.split(".")[1]
|
card_iid = entity_id.split(".")[1]
|
||||||
if int(self.current_card.config.get("pin")) == int(value):
|
if int(self.current_card.config.get("pin")) == int(value):
|
||||||
@@ -279,7 +279,7 @@ class LovelaceUIPanel:
|
|||||||
self.current_card = self.searchCard(card_iid)
|
self.current_card = self.searchCard(card_iid)
|
||||||
self.render_current_page(switchPages=True)
|
self.render_current_page(switchPages=True)
|
||||||
case _:
|
case _:
|
||||||
ha_control.handle_buttons(entity_id, btype, value, entity_config)
|
ha_control.handle_buttons(entity_id, btype, value)
|
||||||
|
|
||||||
if msg[1] == "pageOpenDetail":
|
if msg[1] == "pageOpenDetail":
|
||||||
entity_id = msg[3]
|
entity_id = msg[3]
|
||||||
|
|||||||
Reference in New Issue
Block a user