I’ve got a sensor for my garage door that reports open/closed conditions.
I’ve tried to set up an automation that will send a message if the door has been left open.
I’m pretty sure there must be something going on with how I have the automation configured because if I run it manually it works and sends the alert. If I just let things ride the automation never fires off even if I open the door and leave it open beyond the 10 minute threshold.
Here is the automation:
alias: Garage Door - Test
description: Test Alert
trigger:
- type: opened
platform: device
device_id: 97a8a44c2cfbce71741adf87c3f6c9eb
entity_id: 83dee3563e5b17067ce23976036d1f2b
domain: binary_sensor
for:
hours: 0
minutes: 0
seconds: 0
condition:
- type: is_open
condition: device
device_id: 97a8a44c2cfbce71741adf87c3f6c9eb
entity_id: 83dee3563e5b17067ce23976036d1f2b
domain: binary_sensor
for:
hours: 0
minutes: 10
seconds: 0
action:
- service: notify.mobile_app_glens_iphone
metadata: {}
data:
message: Glen's garage door is open
mode: single
I didn’t know how to copy the automation other than copying the code.
I’m not sure why opening the door would not fire off the automation. There was one item on the “When” section of the config. That is “Duration.” Device and trigger seem straightforward but the duration seems confusing.
If I understand it correctly the “And” section is where I’m setting the open duration. I have it set for “And if” the door is open for 10 minutes… it should “Then do”
If someone could point me in the right direction I would appreciate it.
Thanks in advance.