I have door closed sensor set. It works fine. i need to set notification if door is left open for 2 minutes and if not closed after that it should send notifications each minute (30 seconds would be even better).
I tried setting alert in configuration.yaml like this:
alert:
main_door:
name: Main door
message: Main door is left open
done_message: Main door is closed
entity_id: binary_sensor.main_door_contact
state: on
repeat: 1
can_acknowledge: false
skip_first: true
notifiers:
- hass_agent_notifier
- mobile_app
When conditions are met nothing happens. Not even an error… it behaves like I did not set alert at all.
However, when I set automation it works:
alias: Main door is open
description: ""
trigger:
- platform: state
entity_id:
- binary_sensor.main_door_contact
from: "off"
to: "on"
for:
hours: 0
minutes: 1
seconds: 0
action:
- service: tts.google_say
data:
entity_id: media_player.pc
message: Main door is open
mode: single
This works bit it is triggered just once. I want it to repeat notifications until door is finally closed.
What am I doing wrong?