diff --git a/clock.py b/clock.py index 12a7e6d..647bfd1 100644 --- a/clock.py +++ b/clock.py @@ -380,9 +380,11 @@ class MyClockWidget(FloatLayout): else: if self.intensity_curr >= 0.5: - self.theme = Theme("Light") + if self.theme.name != "Light": + self.theme = Theme("Light") else: - self.theme = Theme("Dark") + if self.theme.name != "Dark": + self.theme = Theme("Dark") self.update_background_automatic_sunrise() @@ -1643,7 +1645,7 @@ class MyApp(App): Clock.schedule_once(clock_widget.get_air_quality, 0) t = datetime.datetime.now() - delay = 60 - (t.second + t.microsecond / 1000000) + delay = 58 - (t.second + t.microsecond / 1000000) if delay < 0: delay = delay + 60 Clock.schedule_once(clock_widget.sync_air_quality, delay)