How to send repeated notifications

Hi,

I have installed a window sensor and I’d like to send repeated notifications when the window is open for a certain amount of time (currently 10 minutes).
I have an automation that calls a script after the window is open for 10 minutes.
The script generates a single notification message and then turns on another (previously inactive) automation that should send repeated notifications until the window is closed again:

alias: 'Bedroom Window Open: Send Repeated alerts'
hide_entity: True
initial_state: off
trigger:
  platform: time
  minutes: '/2'
  seconds: '00'
condition:
  - condition: state
    entity_id: sensor.fibaro_system_fgk10x_door_opening_sensor_access_control_16_9
    state: '22'
action:
  service: notify.telegram
  data:
    message: 'Close the bedroom window!'

Currently I’m receiving the notification from the first script and only a single notification from the second one.
Apparently the “minutes: '/2'” trigger is only firing once.
Does anyone see why?
(The window sensor state did not change)

The logbook entries look like this:

3:55 PM		Bedroom Window Sensor turned off
3:55 PM		Bedroom Window changed to Closed
3:55 PM		Fib FGK Access Control changed to 23
3:50 PM		Bedroom Window Open: Send Repeated alerts has been triggered
3:49 PM		Bedroom Window Open has been triggered
3:39 PM		Bedroom Window Sensor turned on
3:39 PM		Bedroom Window changed to Open
3:39 PM		Fib FGK Access Control changed to 22

TIA,
Sebastian

Seb - I saw this last week (I make a habit of going through the pull requests to see what’s coming up and also to check on issues being fixed) and it may be of interest to you.

https://github.com/home-assistant/home-assistant/pull/5201

Check the link from @rpitera but until then…I just checked my config where I do not have single quotes around my time in the config which works. Maybe try to remove the quotes around the /2 and the 00

~Cheers

1 Like

Thanks, that sounds like a really useful addition!
I’ll keep my eyes open for that one.

Sebastian

Thanks, I’ll try it without the single quotes, but I don’t have much hope as the first of the repeated notifications does fire on time.

Sebastian

And you were right - I removed the quotes and it worked as expected.
Thanks!

Sebastian

1 Like