fix screensaver brightness

This commit is contained in:
Johannes
2022-03-28 23:27:59 +02:00
committed by GitHub
parent 321604dd52
commit 3eba8dad15

View File

@@ -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)
self._ha_api.get_entity(entity_id).call_service(f"alarm_{button_type}", code=value)