From 7d2435bbe939428c9fbc6948a1cf98a34e91698a Mon Sep 17 00:00:00 2001 From: Aaro Varis Date: Thu, 15 Jan 2026 10:45:17 +0200 Subject: [PATCH] Update relay GPIO write method to use integer values and display last button press time on LCD --- init.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.py b/init.py index 89071e8..3be5aac 100644 --- a/init.py +++ b/init.py @@ -49,7 +49,7 @@ class AlarmClock: print(f"Button '{button}' pressed state: {state}") if button == "button": self.lastButtonPressTime = time() - self.relayGpio.write(GPIO.HIGH if state else GPIO.LOW) + self.relayGpio.write(1 if state else 0) self.setLcdText(self.lastButtonPressTime.__str__()) def setLcdText(self, text: str):