I have setup this automation where when the heating starts it is spoken from google home.
The think is that I have 2 different heating zones and if they start simultaneously both automation are triggered but I hear just the first once since google home is busy.
Is there a way to make this to work? My idea is to delay the second automation for 5sec after the first automation was triggered or the other way round
- id: '1542598626834'
alias: Speak Heating Downstairs Start
trigger:
- entity_id: sensor.downstairs_state
from: Standby
platform: state
to: Comfort(Running)
- entity_id: sensor.downstairs_state
from: Standby
platform: state
to: Comfort(Warm Up)
condition:
- after: '8:30'
condition: time
action:
- data:
entity_id: media_player.google_home
message: The heating downstairs has started running
service: tts.google_translate_say
- id: '1542598612567'
alias: Speak Heating Upstairs Start
trigger:
- entity_id: sensor.upstairs_state
from: Standby
platform: state
to: Comfort(Running)
- entity_id: sensor.upstairs_state
from: Standby
platform: state
to: Comfort(Warm Up)
condition:
- after: '8:30'
condition: time
action:
- data:
entity_id: media_player.google_home
message: The heating upstairs has started running
service: tts.google_translate_say
You need to put it before the tts.google_translate_say.
That will pause sending the tts to the speaker until it is idle. The timeout value is how long to wait before continuing anyway. This can be set as long as you want it to queue. There is also an option for wait template to not continue after the timeout value expires.
Edit: Bare in mind that if you use the speaker for music or something, it will not interrupt and may result in your missing the announcement.
I have managed to solve the issue.
The problem was that the automation was triggered at the exact same time resulting to hear just the first one. Adding once second delay solved the issue.