Hi all.
I’ve read some other posts and the documentation but I’m afraid still being very new to this it’s still not clear what I’m doing wrong. If I run a test, it says run successfully but nothing is coming through. I’ve pieced the structure together from parts that the UI created and other posts. I don’t know if this is causing problems due to the fact that I’m trying to pass multiple options to an entity_id .
Any help or further docs to read would be appreciated.
Thanks
Alan
Automation:
service: script.notify_chosen_google_devices
data:
devices:
- media_player.gh_chef
message: test 1 2 3
Script:
alias: Notify Chosen Google Devices
description: Send message to specific 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
default:
- media_player.gh_chef
- media_player.gh_main
- media_player.gh_lunar_lander
- media_player.gh_sleepy
- media_player.gh_toto
required: true
sequence:
- service: tts.speak
target:
entity_id: tts.google_en_com
data_template:
cache: false
media_player_entity_id: "{{devices}}"
message: "{{message}}"
# The following is just to stop the cast icon from staying
- wait_template: "{{ is_state("{{devices}}", 'idle') }}"
- service: media_player.turn_off
target:
entity_id: "{{devices}}"
data: {}