Compiled announcements when arriving

Evening All,

I am looking to use my Google Home to be useful when I arrive home such as things like announcements and asking me if I want music etc.

I thought I would start simple and just get the announcements working first but hit a snag already! Don’t know how to queue more than one thing up!

For instance, I have two automations once to announce when the washing machine has finished and one to announce when the tumble dryer have finished. If we are not home then instead of announcing it will set a boolean and as we arrive home and walk through the front door I then want it to play the announcement(s) will play.

I can do this if only the washing machine or the tumble dryer has finished but what happens if they are both finished? Don’t want the announcements to play at the same time!?!

So confused The only way I can thing of doing it is having 3 automations:

  1. Washing Machine Finished but not Tumble dryer
  2. Tumble Dryer Finished but not Washing machine
  3. Washing Machine and Tumble Dryver finished

But this would get extremly messy the more I want to add to these announcements.

Any advice greatly appreciated.

Create one boolean for each possible announcement, and a master boolean to permit announcements.
When each device finishes, set the approriate announcement boolean. When you leave, clear the master, and when you return set it again.

Then… have an automation which is triggered by any of the booleans (announcements or master) being set to true, but with a condition that the master must be set. So if anything finishes whilst you’re away, this automation will just exit. On the other hand, as soon as you’re back (or if you’re home when something finishes), then it’ll run.
All it does is test each announcement flag in turn. If it’s set, then make the announcement, clear the flag, and wait a couple of seconds (for the announcement to complete). Rinse and repeat for the other flags.
If you want to add more announcements, then you need to create a new boolean (but you’re doing that already), set it when necessary and add an appropriate handler to the announcement automation. Or, if you’re feeling up to it, put all the announcement booleans into a group, and have the automation just loop through the group, and make the announcement using a template which includes the name of the boolean.

Put your TTS service calls in a wrapper script. Set the mode for that script to queued. Always call your TTS message with this wrapper script. Your TTS messages will be automatically queued.

mode: queued

    alias: TTS Play
    description: Play TTS announcement message.
    mode: queued
        description: String - message to play.
        example: This is a test message.
  etc. etc.

@wimble That’s a lot of unnecessary work! Script modes eliminated the need for all that.