From c74c3c288af3ab35fab98f3f6a976dff52cdc988 Mon Sep 17 00:00:00 2001 From: Aaro Varis Date: Thu, 5 Feb 2026 10:33:37 +0200 Subject: [PATCH] Enhance AlarmClock to skip wakeup actions in non-normal modes and reset actions on alarm time change --- init.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/init.py b/init.py index 0277bb0..15a7930 100644 --- a/init.py +++ b/init.py @@ -126,6 +126,10 @@ class AlarmClock: """Check and trigger any wakeup actions that are due""" if not self.wakeupActions: return + + # if not in normal mode, skip wakeup actions + if self.configMode != "normal": + return now = datetime.now(ZoneInfo(city.timezone)) today_alarm = now.replace( @@ -232,6 +236,7 @@ class AlarmClock: # Increment minute self.alarmTime = self.alarmTime.replace(minute=(self.alarmTime.minute + 1) % 60) self.setLcdText(f"Set Min: {self.alarmTime.minute:02d}") + self.resetWakeUpActions() # Reset wakeup actions to apply new alarm time immediately def onLongPress(self): """Handle long button press - cycle through configuration modes"""