I’ve been banging my head on this one for hours, please help.
I have a Z-Wave sensor on my pantry door and a controlled Z-Wave outlet to control the lights. I also want to alert if the door is left open, we don’t want the dogs to self-feed.
An alert is easy, and that works just fine. I was impressed when I stumbled upon that component. However, I have Aeotec Doorbell Gen 5’s that I want to play a sound after two minutes of the door being open and every two minutes afterwards. As there doesn’t seem to be an easy way to plug that into the notification system to use an alert I need to implement an automation.
Here’s the alert, which works well:
alert:
kitchen_pantry_open:
name: "Pantry door left open"
entity_id: binary_sensor.pantry_door
state: 'on'
repeat: 2
skip_first: true
notifiers:
- house
Now here is the automation, complete with debugging:
automation:
- id: Kitchen Pantry Open
trigger:
- platform: state
entity_id: binary_sensor.pantry_door
to: 'on'
from: 'off'
action:
- service: notify.jeff_mobile
data:
message: "Timer Start"
- service: timer.start
entity_id: timer.kitchen_pantry_alert
- id: Kitchen Pantry Timeout
trigger:
- platform: event
event_type: timer.finished
event_data:
entity_id: timer.kitchen_pantry_alert
condition:
condition: state
entity_id: alert.kitchen_pantry_open
state: 'on'
action:
- service: notify.jeff_mobile
data:
message: "Timer Repeat"
- service: timer.start
entity_id: timer.kitchen_pantry_alert
timer:
kitchen_pantry_alert:
duration: '00:02:00'
What works:
- I get the “Timer Start” alert
- If I manually start the timer, I get the “Timer Repeat” alert and it repeats if the door is open
What doesn’t work:
- The timer is never started by “Kitchen Pantry Open” automation.
I assume that I’m missing something obvious.
I’m running the Home Assistant container which is currently at 0.90.1. All that code is in a package. I’ve tried separating the automations out into a separate file, that did not change the behavior.
Thanks.
Jeff