Hi all!
I am still fairly new to HA, so hope this is not too basic of a question. I am playing around with TTS on a Google Home and try to send multiple messages as a sequence to a Google Home. I am creating a script to manage this and take the messages as input variable. The challenge I am facing is that I am calling the first TTS command, then I need a delay, and then the second TTS command. The delay needs to be as long as Google Home needs for the first message, without knowing the length of it beforehand. A minimal setup of the fixed length delay would be:
broadcast_msg_single_device:
alias: 'Broadcast a message on a single device'
sequence:
- service: tts.google_say
data_template:
entity_id: "{{ device_name }}"
message: "{{ msg }}"
language: "{{ lang }}"
- delay:
seconds: 2
- service: tts.google_say
data_template:
entity_id: "{{ device_name }}"
message: "{{ msg2 }}"
language: "{{ lang }}"
I am looking for a step that kind of checks if Google Home is still speaking and waits for it to end, only then continues with the script. Is anybody having any ideas/suggestions for this? Thank you!