I have a script to TTS on my Google home speakers. I can call it and pass in the message.
I to see how I can take it to the next level and actually select which speakers on individual calls to the script. How can I make it so that when I call the script it shows check boxes for all the configured speakers and then I can tick each one I want?
''
alias: Announce
description: Play message on speakers
fields:
message:
name: Message
description: The message you want to play
selector:
text: null
sequence:
- service: tts.google_cloud_say
target:
entity_id: |
{% if is_state('input_boolean.test_mode', 'on') %}
media_player.kids_room_speaker
{% elif is_state('input_boolean.client_session', 'on') %}
media_player.kids_room_speaker, media_player.living_room_group
{% else %}
media_player.all_speakers
{% endif %}
data:
message: <speak><prosody volume="+60dB">"{{ message }}"</prosody></speak>
mode: queued
icon: mdi:bullhorn-variant
max: 10
''