I do this with an input_boolean.
The input_boolean is set as a condition, and will only allow the notification to run if the input_boolean is off. The notification then turns the input_boolean ON as the final step. I then set up an automation to turn OFF the input_boolean after one minute.
Works without a hitch and allows so that only one notification gets sent during that minute.
Glad you like it. It was a standard feature on the automation app I used before I discovered HA. I use it a lot to ensure things don’t run when they’re not supposed to, like only vacuum the house once a day
Thank you all for the replies. I do like the solution from lolouk44 and will try to inplement that. Is a universal automation witch can be used easily in multiple automations without addition of extra scripts
This is a pretty neat idea and I’m borrowing it too. However, I’m not that bright. Do I change the ‘300’ to the number of seconds I want my automation disabled for? Thanks for sharing
I know this thread has sat dormant for a while, but I’m trying to do exactly this and can’t get it to work.
My automation looks like this:
- alias: Driveway Motion Notify Telegram
trigger:
- platform: state
entity_id: binary_sensor.driveway_motion
from: 'off'
to: 'on'
condition:
- condition: template
value_template: '{{ (as_timestamp(now()) - as_timestamp(states.automation.automation.driveway_motion_notify_telegram.attributes.last_triggered | default(0)) | int > 30)}}'
action:
service: notify.telegram
data:
message: Motion in Driveway
data:
photo:
- url: http://192.168.1.105:81/image/Cam1
caption: Motion In Driveway
with the condition in the automation I don’t get any notifications. Works fine otherwise. It is just that the motion sensor triggers 4 or 5 times for each car/person/deer/cat up or down the driveway.