I have a specific need that I’ve been trying to accomplish with mixed results. I need to get a message when my front door is opened for more than 3 minutes. Also, I want this message to continue every 3 minutes until the door is closed. I would also like that the first message is sent as soon as the 3 minutes of the opened door is reached.
Right now my automation fires without waiting the 3 minutes, but the repeat every 3 minutes works just fine. So at this point, if I open my door for any duration (even less than 3 minutes) I will get the first message 3 minutes after and I will continue to get the message until the door is closed.
Problems I have:
- The for: in the trigger is not working for some reason as it fires without waiting.
- I get the first message after the delay in the repeat action. I only want message #2 and every other one every 3 minutes.
This is my automation:
alias: DOOR_OPEN
description: Door open for more than 2 minutes
trigger:
- platform: state
entity_id: binary_sensor.main_door
from: 'off'
to: 'on'
for: 00:03:00
condition: []
action:
- repeat:
until:
- condition: state
entity_id: binary_sensor.main_door
state: 'off'
sequence:
- delay: 00:03:00
- service: notify.pushbullet
data:
message: Main door opened!,
target:
- email/[email protected]
mode: single
Thank you!