diff --git a/server.py b/server.py index 9745ea9..98cb13e 100644 --- a/server.py +++ b/server.py @@ -190,7 +190,7 @@ async def monitor_state_transitions(app): if open_duration_minutes >= threshold and threshold not in OPEN_ALERTS_SENT_FOR_CURRENT_OPENING: logging.info(f"ALERT: Garage door has been open for {threshold} minutes.") OPEN_ALERTS_SENT_FOR_CURRENT_OPENING.append(threshold) - else: + elif current_state == 'closed': DOOR_OPEN_START_TIME = None OPEN_ALERTS_SENT_FOR_CURRENT_OPENING = []