I have a script that I am using for morning announcements. I am able to pass the media device, the person’s name, and whether or not a morning briefing is needed. The issue I’m having is when I pass the media device, this works:
service: notify.alexa_media
data:
message: >
<voice name="Brian"> <amazon:auto-breaths> <prosody rate="fast"> {%from
'phrases.jinja' import goodmorning_phrases %} {{ goodmorning_phrases |
random }} <emphasis level="moderate"> {{ target_name }} </emphasis> <break/>
Time to get <emphasis level="moderate"> up </emphasis> </prosody>
</amazon:auto-breaths> </voice>
target: media_player.{{ speaker_target }}
data:
type: tts
enabled: true
However this does not:
service: notify.alexa_media
data:
message: >
<voice name="Brian"> <amazon:auto-breaths> <prosody rate="fast"> {%from
'phrases.jinja' import goodmorning_phrases %} {{ goodmorning_phrases |
random }} <emphasis level="moderate"> {{ target_name }} </emphasis> <break/>
Time to get <emphasis level="moderate"> up </emphasis> </prosody>
</amazon:auto-breaths> </voice>
target:
- '{{ speaker_target }}'
data:
type: tts
enabled: true
This is the automation I’m using to call the script:
service: script.morning_announcement_and_briefing
data:
target_name: Erik
briefing_needed: "True"
speaker_target: office_echo
when I’m trying to pass the entity ID in the example that doesn’t work, I am passing media_player.office_echo.
I’m obviously missing something here but can’t find it. Long term I’d like to pass multiple entities to this announcement, is that possible?