I can’t for the life of me figure out what i’m doing wrong. The TTS service is called twice in this automation, however only one of them will ever play. If both are left in the second will play ignoring the first. If i delete the second the first plays just fine?
alias: Briefing
trigger:
platform: numeric_state
entity_id: sensor.aeon_labs_zw100_multisensor_6_burglar_2
above: 3
action:
- service: media_player.volume_set
data_template:
entity_id: media_player.bedroom_google_mini
volume_level: 0.7
- service: tts.amazon_polly_say
entity_id: media_player.bedroom_google_mini
data_template:
message: '{{ [ "Aw shi, good morning motherfu" , "Rise and shine, time to suck todays .." , "Good morning big pimpin, I hope you slept well" , "Time to get up motherf." ] |random }}'
- service: tts.amazon_polly_say
entity_id: media_player.bedroom_google_mini
data_template:
message: >
It's currently {{states.sensor.dark_sky_summary.state}} and {{states.sensor.dark_sky_temperature.state|round}} degrees.
Today you can expect {{states.sensor.dark_sky_hourly_summary.state}}.
most likely because the device you are sending this to doesn’t have a Queue ability. So the second message is all that it recieves and plays. The first one plays too, but it immediately get’s trumped by the second.
You either need to build a poormans queuing mechanism using automations (pain in the ass). Or just combine them into 1 message. Personally, i’d go for the latter.
- service: media_player.volume_set
data_template:
entity_id: media_player.bedroom_google_mini
volume_level: 0.7
- service: tts.amazon_polly_say
entity_id: media_player.bedroom_google_mini
data_template:
message: >
{{ [ "Aw shi, good morning motherfu" , "Rise and shine, time to suck todays .." , "Good morning big pimpin, I hope you slept well" , "Time to get up motherf." ] |random }}
It's currently {{states.sensor.dark_sky_summary.state}} and {{states.sensor.dark_sky_temperature.state|round}} degrees.
Today you can expect {{states.sensor.dark_sky_hourly_summary.state}}.
Yes, if you have the ability to see that the voice controller is playing something and it stops when it’s done playing. Oddly enough, these devices may not have that information.