mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2026-02-13 00:27:12 +01:00
implements #380
This commit is contained in:
@@ -76,6 +76,7 @@ class LuiBackendConfig(object):
|
||||
'sleepBrightness': 20,
|
||||
'screenBrightness': 100,
|
||||
'sleepTracking': None,
|
||||
'sleepTrackingZones': ["not_home", "off"],
|
||||
'sleepOverride': None,
|
||||
'locale': "en_US",
|
||||
'timeFormat': "%H:%M",
|
||||
|
||||
@@ -95,7 +95,7 @@ class LuiController(object):
|
||||
sleepBrightness = 0
|
||||
brightness = self.calc_current_brightness(self._config.get("screenBrightness"))
|
||||
|
||||
if bst is not None and self._ha_api.entity_exists(bst) and self._ha_api.get_entity(bst).state in ["not_home", "off"]:
|
||||
if bst is not None and self._ha_api.entity_exists(bst) and self._ha_api.get_entity(bst).state in self._config.get("sleepTrackingZones"):
|
||||
self._ha_api.log(f"sleepTracking setting brightness to 0")
|
||||
sleepBrightness = 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user