diff --git a/apps/nspanel-lovelace-ui/luibackend/controller.py b/apps/nspanel-lovelace-ui/luibackend/controller.py index 6ad3c56d..a3ca86a3 100644 --- a/apps/nspanel-lovelace-ui/luibackend/controller.py +++ b/apps/nspanel-lovelace-ui/luibackend/controller.py @@ -86,9 +86,9 @@ class LuiController(object): current_screensaver_brightness = sorted_timesets[index-1]["value"] LOGGER.info("Setting dim value to %s", sorted_timesets[index-1]) found_current_dim_value = True - # still no dim value - if not found_current_dim_value: - self.current_screensaver_brightness = sorted_timesets[-1]["value"] + # still no dim value + if not found_current_dim_value: + current_screensaver_brightness = sorted_timesets[-1]["value"] return current_screensaver_brightness def weather_update(self, kwargs): @@ -221,4 +221,4 @@ class LuiController(object): # for alarm page if button_type in ["disarm", "arm_home", "arm_away", "arm_night", "arm_vacation"]: - self._ha_api.get_entity(entity_id).call_service(f"alarm_{button_type}", code=value) \ No newline at end of file + self._ha_api.get_entity(entity_id).call_service(f"alarm_{button_type}", code=value)