a
This commit is contained in:
2
init.py
2
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__())
|
||||
|
||||
Reference in New Issue
Block a user