From df54a56805a987466491d8cc5499fabd79ee4cb4 Mon Sep 17 00:00:00 2001 From: Arthur Deierlein Date: Thu, 4 Jan 2024 08:59:36 +0100 Subject: [PATCH] feat: turn of light after 19:00 --- flappytime.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flappytime.py b/flappytime.py index 50fab10..037f46d 100644 --- a/flappytime.py +++ b/flappytime.py @@ -88,6 +88,7 @@ def lights_off(): # we can overwrite: forced or own message send_message(formatted_message) - if datetime.now().weekday() in (5, 6): + if datetime.now().weekday() in (5, 6) or datetime.now().hour >= 19: # on weekends, light should be turned off + # after 19:00 light should be turned off lights_off()