From 9775a9790309fbc6ab528142bbb2072c7be957b3 Mon Sep 17 00:00:00 2001 From: Aaro Varis Date: Thu, 15 Jan 2026 10:49:36 +0200 Subject: [PATCH] a --- init.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.py b/init.py index eb2cda4..0356126 100644 --- a/init.py +++ b/init.py @@ -50,7 +50,7 @@ class AlarmClock: def onButtonPress(self, button: str, state: bool): print(f"Button '{button}' pressed state: {state}") - if button == "button": + if button == "button" and state == True: self.lastButtonPressTime = time() self.setRelayState(not self.relayGpio.read()) self.setLcdText(self.lastButtonPressTime.__str__())