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