From 733a3d41e837df5fded2b4247706977792d3802a Mon Sep 17 00:00:00 2001 From: miro Date: Fri, 16 Aug 2024 20:14:39 +0100 Subject: [PATCH] syntax error --- ovos_gui_plugin_shell_companion/brightness.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ovos_gui_plugin_shell_companion/brightness.py b/ovos_gui_plugin_shell_companion/brightness.py index d39f92a..143abc0 100644 --- a/ovos_gui_plugin_shell_companion/brightness.py +++ b/ovos_gui_plugin_shell_companion/brightness.py @@ -38,7 +38,7 @@ def __init__(self, bus, config: dict): self.default_brightness = self.config.get("default_brightness", 100) self._brightness_level: int = self.default_brightness - self.sunrise_time, self.sunset_time = self.get_suntimes() + self.sunrise_time, self.sunset_time = None, None self.discover() @@ -396,8 +396,8 @@ def get_suntimes(self) -> Tuple[datetime.datetime, datetime.datetime]: if reference > sunset_time: # get next sunset, today's already happened sunset_time = s2["sunset"] - if self.sunrise_time != sunrise_time: + if self.sunrise_time is None or self.sunrise_time != sunrise_time: LOG.info(f"Sunrise time: {sunrise_time}") - if self.sunset_time != sunset_time: + if self.sunset_time is None or self.sunset_time != sunset_time: LOG.info(f"Sunset time: {sunset_time}") return sunrise_time, sunset_time