Hi all
I have a script to call a TTS services to my google devices to announce whatever is needed in the automation. I have an idle check before restoring the state on them. This works if I do the same script for a single coded in entity (instead of the inputted list) or for the entire lot using the home group. But it doesn’t work for the inputed field. Can anyone help? Ignore the timeout option as I just put that in to get around my issue.
Thanks
Alan
alias: Notify Chosen Google Devices
sequence:
- service: scene.create
data:
scene_id: google_state
snapshot_entities: "{{devices}}"
enabled: true
- service: media_player.volume_set
target:
entity_id: "{{devices}}"
data:
volume_level: 0.6
enabled: true
- service: tts.speak
target:
entity_id: tts.google_en_com
data_template:
cache: false
media_player_entity_id: "{{devices}}"
message: "{{message}}"
- wait_template: "{{ is_state('{{devices}}', 'idle') }}"
enabled: true
timeout: "10"
continue_on_timeout: true
- service: scene.turn_on
target:
entity_id: scene.google_state
data: {}
enabled: true
description: Send message to chosen google devices
icon: mdi:speaker-multiple
fields:
message:
selector:
text: null
name: Message
description: What is the message to announce on a specific speaker
required: true
devices:
selector:
entity:
domain: media_player
multiple: true
name: Devices
description: What google devices do you want to run on
required: true
default:
- media_player.gh_chef
- media_player.gh_lunar_lander
- media_player.gh_main
- media_player.gh_sleepy
- media_player.gh_toto
- media_player.gh_sausage_giraffe