Say alert is from Doormind
This commit is contained in:
@@ -202,7 +202,7 @@ async def monitor_state_transitions(app):
|
|||||||
|
|
||||||
for threshold in OPEN_ALERT_THRESHOLDS_MINUTES:
|
for threshold in OPEN_ALERT_THRESHOLDS_MINUTES:
|
||||||
if open_duration_minutes >= threshold and threshold not in OPEN_ALERTS_SENT_FOR_CURRENT_OPENING:
|
if open_duration_minutes >= threshold and threshold not in OPEN_ALERTS_SENT_FOR_CURRENT_OPENING:
|
||||||
msg = f"ALERT: Garage door has been open for {threshold} minutes."
|
msg = f"Doormind: Garage door has been open for {threshold} minutes."
|
||||||
await controller_message(app, msg)
|
await controller_message(app, msg)
|
||||||
logging.info(msg)
|
logging.info(msg)
|
||||||
OPEN_ALERTS_SENT_FOR_CURRENT_OPENING.append(threshold)
|
OPEN_ALERTS_SENT_FOR_CURRENT_OPENING.append(threshold)
|
||||||
|
Reference in New Issue
Block a user