I’ve read numerous alert methods on here and still can find and get my alert method working.
I want to be alerted every 5min if a door is left open via Pushover, my setup is here:
You’ll see for testing I changed to input_boolean as a sensor and reduced to 10 seconds.
I get the first alert at 10 seconds, then never again
# Door Left open
- alias: "Main Door Left Open Alert"
trigger:
- entity_id: input_boolean.test_sensor
platform: state
to: 'on'
for:
seconds: 10
condition:
- condition: template
# Only do every 300 seconds (5 min)
value_template: '{{ (as_timestamp(now()) - as_timestamp(states.automation.main_door_left_open_alert.attributes.last_triggered
| default(0)) | int > 10)}}'
- condition: state
entity_id: input_boolean.notify_main_door
state: 'on'
action:
- data:
message: "Door Left Open"
title: ''
service: notify.pushover_service
How do I get it to repeat? The Alert feature of HA doesn’t appear to allow conditions
I do not want to receive an alert if I set a switch to ‘off’, but if the switch is ‘on’ then i want an alert every 5min or until the door is closed. I have setup a seperate boolean input for that “feature” to control when alerts should be sent.
I see. Try using a repeating trigger then… This will trigger the automation every 5 minutes. You just need to ensure your conditions are only true when you want the notification to send.