Hi all,
I’ve tried without success to delay in action inside an automation. Here’s the code:
- alias: Status Trenitalia 18.45
trigger:
- platform: zone
entity_id: device_tracker.marcoxiaomi
zone: zone.milano_garibaldi
event: enter
condition:
- condition: state
entity_id: 'binary_sensor.workday_sensor'
state: 'on'
- condition: time
after: '18:00'
before: '20:00'
action:
# service: script.notificatreno1845
- delay: 0:35
- service: notify.pushbullet
data_template:
message: "Marco ha preso il treno delle 18 e 45 che ha un ritardo di {{ states.sensor.frecciarossa_delle_1845.state }} minuti.\n"
- service: media_player.volume_set
data_template:
entity_id: media_player.snapcast_group_6988ce33a9473967a748a19510baa67f
volume_level: 0.5
- service: tts.google_say
entity_id: media_player.snapcast_group_6988ce33a9473967a748a19510baa67f
data_template:
message: "Marco ha preso il treno delle 18 e 45 che ha un ritardo di {{ states.sensor.frecciarossa_delle_1845.state }} minuti.\n"
I searched around the forum and on reddit but, apparently, nothing worked.
Can someone please support me?
Thank you in advance!This text will be hidden