I have an automation (below) which will make an announcement/notification to my Alexa Echo Dot and Google Nest Mini when the back door is open longer than 7 minutes.
How can I make the automation repeat the announcement 4 times with 90 seconds wait between each announcement?
- id: '1597611826726'
alias: Back Door open warning
trigger:
- entity_id: binary_sensor.ecolink_door_window_sensor_sensor_2
for: 00:07:00
from: 'off'
platform: state
to: 'on'
action:
- data:
entity_id: media_player.living_room_speaker
message: Please don't forget to close the back door!
service: tts.google_translate_say
- data:
target:
- media_player.mka_net_echo_dot
data:
type: announce
message: "Please don't forget to close the back door!"
service: notify.alexa_media
mode: single
Below, is my best attempt at doing this (which is definitely wrong). I’m hoping someone can check my syntax to see what I’m doing wrong:
- id: '1597611826726'
alias: Back Door open warning
trigger:
- entity_id: binary_sensor.ecolink_door_window_sensor_sensor_2
for: 00:07:00
from: 'off'
platform: state
to: 'on'
action:
service: loop.loop
data:
loops: 4
delay_after: 90
actions:
- data:
entity_id: media_player.living_room_speaker
message: Please don't forget to close the back door!
service: tts.google_translate_say
- data:
target:
- media_player.mka_net_echo_dot
data:
type: announce
message: "Please don't forget to close the back door!"
service: notify.alexa_media
mode: single