From 53deb3ab8550a45d7df79d6b33c481f7ff30eeb3 Mon Sep 17 00:00:00 2001 From: joBr99 <29555657+joBr99@users.noreply.github.com> Date: Mon, 20 Nov 2023 20:33:27 +0100 Subject: [PATCH] fix --- nspanel-lovelace-ui/config.yaml | 2 +- nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/ha_control.py | 2 +- nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/panel.py | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/nspanel-lovelace-ui/config.yaml b/nspanel-lovelace-ui/config.yaml index 3114ed0c..9b04a134 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.23" +version: "4.7.24" 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 c1642046..95fb9398 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 @@ -18,7 +18,7 @@ def calculate_dim_values(sleepTracking, sleepTrackingZones, sleepBrightness, scr dimmode = sleepBrightness elif libs.home_assistant.is_existent(sleepBrightness): involved_entities.append(sleepBrightness) - dimValueNormal = int(libs.home_assistant.get_entity_data(sleepBrightness).get('state', 10)) + dimmode = int(libs.home_assistant.get_entity_data(sleepBrightness).get('state', 10)) if screenBrightness: if isinstance(screenBrightness, int): 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 e2474e9e..43f9ca1b 100644 --- a/nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/panel.py +++ b/nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/panel.py @@ -135,6 +135,7 @@ class LovelaceUIPanel: self.settings.get("screenBrightness"), self.settings.get("sleepOverride"), ) + print(dimValue, dimValueNormal) backgroundColor = self.settings.get("defaultBackgroundColor", "ha-dark") if backgroundColor == "ha-dark":