Hello. I have the following automation triggering for reminding everybody that the trash is getting picked up. What it does on triggered:
mute TV (so that I can hear the message)
speak through chromecast to another speaker
unmute TV.
I have different speak-messages that varies in length so the mute delay for 8 secs, is sometimes too long or too short. Is it possible to change this with a wait template that unmutes the TV when the message is done playing?
My configuration:
- alias: Trash
trigger:
- platform: state
entity_id: sensor.garbage_pickup
to: 'on'
action:
- service: remote.send_command
data:
entity_id: remote.harmony_hub
command:
- Mute
device: 10391392
- service: tts.amazon_polly_say
data_template:
entity_id: media_player.chromecast
message: >
<speak>Here I say something of different lengths</speak>
- delay: 00:00:08
- service: remote.send_command
data:
entity_id: remote.harmony_hub
command:
- Mute
device: 10391392
How about breaking it into 2 automations?
Have the first automation mute the TV and play the message, and have the second automation trigger on the Chromecast/speaker media_player status changing to idle / off / != playing depending on how it behaves once it’s done playing?
Is there a blushing-face emojii? Feel kind of stupid for asking this question now. It is, of course, as easy as you have written it. I cannot understand how I managed to over-complicate this in my head Thanks a lot!
As a little sidenote, I really like this HA community!