I have been able to create a custom sentence to play a specific radio station on one of my media players through the use of variables and lists. In this way I can specific which media player simply by saying its common name, rather than the entity name.
I would like to have HA respond with the same name, rather than the entity name. In my yaml below, how do I modify intent_script.yaml
to respond with “Playing CBC Radio in kitchen” rather than “Playing CBC Radio in media_player.kitchen”?
##intent_script.yaml
PlayCBConPlayer:
speech:
text: "Playing CBC radio in {{ media_player }}."
action:
- service: script.squeezebox_play_cbc1
data_template:
player: "{{ media_player }}"
##custom_sentences/en/squeezebox.yaml
language: "en"
intents:
#- Play CBC radio [on {{ player }} ]
PlayCBConPlayer:
data:
- sentences:
- "play CBC [radio] [on|in] {media_player}"
lists:
media_player:
values:
- in: "kitchen"
out: "media_player.kitchen"
- in: "office"
out: "media_player.office"
- in: "basement"
out: "media_player.basement_pool"
- in: "pool"
out: "media_player.basement_pool"