Hi,
I have an automation which calls a speech-engine script to provide me with a morning briefing using Amazon Polly (written using Jinja Macros) and another automation-script combo to give me 1min news report from the BBC (this one thanks to Rob @robconnolly)
The first script has a fairly long (and variable) execution time and I’d like to be able to detect when it’s finished so I can trigger the next automation (the news report).
Here are the Automations. As they are now, this does not work, and only provides me with the news report (disable news automation and I get the morning briefing)
automation:
- id: 'D774BFC7-71EA-4A44-B0DD-53E4C57A7F76'
alias: Good Morning Report
initial_state: false
trigger:
- platform: state
entity_id: binary_sensor.hue_motion_office
to: 'on'
condition:
- condition: time
after: '04:00:00'
before: '08:30:00'
- condition: state
entity_id: input_boolean.good_morning_report
state: 'off'
action:
- service: media_player.volume_set
target:
entity_id: media_player.nest_living_room
data:
volume_level: 0.6
- service: script.good_morning_briefing
data:
message: >-
{{ [ "This never gets called",
"This never gets called"
] | random }}
- service: input_boolean.turn_on
entity_id: input_boolean.good_morning_report
- id: '1B97333C-0C1A-4537-B975-88DECC51457E'
alias: Good Morning News Report
initial_state: false
trigger:
- platform: state
entity_id: input_boolean.good_morning_report
to: 'on'
condition:
- condition: state
entity_id: input_boolean.good_morning_news_report
state: 'off'
action:
- service: media_player.volume_set
target:
entity_id: media_player.nest_living_room
data:
volume_level: 0.6
- service: script.play_news_summary
data:
message: >-
{{ [ "This never gets called",
"This never gets called"
] | random }}
- service: input_boolean.turn_on
entity_id: input_boolean.good_morning_news_report