I am trying to automate door sensor. The goal is to alarm the phone if it is opened longer than 15 minutes.
Below code does not work. Would appreciate help to resolve it. Thank you!
alias: Garage ver2
description: Notify phone if door is opened more than designed time limit
trigger:
- type: opened
platform: device
device_id: *****e5e1125
entity_id: *****f76f29
domain: binary_sensor
condition: []
action:
- delay:
hours: 0
minutes: 5
seconds: 0
milliseconds: 0
- if:
- type: is_open
condition: device
device_id: *****e5e1125
entity_id: *****f76f29
domain: binary_sensor
then:
- service: notify.mobile_app_oneplus_a6003
data:
title: DO NOT FORGET TO
message: close the garage!
ttl: 0
priority: high
channel: alarm_stream
- repeat:
until:
- type: is_not_open
condition: device
device_id: *****e5e1125
entity_id: *****f76f29
domain: binary_sensor
sequence: []
mode: restart