Home Assistant and Google Home broadcasts

We have six Google Home Mini devices around our home, and now I can get Home Assistant to automatically deliver broadcast messages. Here’s how I did it.

Broadcast messages

When you have more than one Google Home device, you can say ‘Okay Google, broadcast [message]’, and it will relay that message to all of the other Google Home devices in your home. It’s useful for announcing that dinner’s ready, for example. Our house is long, rather than square, and I’m hard of hearing, so we use this quite a lot.

What I wanted to achieve was automation of these broadcasts, so that a broadcast was triggered by an event. This is possible thanks to the Google Assistant SDK integration. It’s a bit of a faff to set up – I recommend following this guide or watching the video embedded below:

Call the service

Once it’s set up, you can test it by opening Home Assistant’s Developer Tools. Click the ‘Service’ tab, and choose the ‘Google Assistant SDK: Send text command’ service. In the command, type something like ‘broadcast "This is a test"‘ and click ‘Call Service’. If you’ve set everything up correctly, your Google Home devices should all say something like “Incoming broadcast; it says: This is a test”.

Create a script

As I write this, the latest version of Home Assistant (2024.4.x) doesn’t allow automations to call services directly. So, to be able to trigger the broadcast, we’ll first need to create a Script in Home Assistant. In my example, I have a script called ‘Washing machine finished broadcast’. The ‘mode’ is left at the default setting of ‘Single’, and then I’ve created an Action which is to Call a Service. As above, I have selected ‘Google Assistant SDK: Send text command’ as the service to call, and then entered ‘broadcast "The washing machine has finished"‘ as the command, which I have ticked. I’ve left the rest blank.

Whilst here, I’ve also added a time condition. As this will be triggered when the washing machine finishes, I don’t want it to run when we might be asleep. We have Google Home devices in each of the bedrooms, and we sometimes run the washing machine overnight.

Home Assistant runs script actions in order. So, if you also want to add a time condition, you’ll need to add this before the Google Assistant SDK service call, or re-order the actions. In this example, I have created a Test action, where the current time is between 8am and 8pm. Outside of those times, the script will fail and not process the next command, so the broadcast action won’t be executed.

Link it to an automation

Now that we have a script, we can integrate this with an automation. I’m using my existing automation that sends a phone notification when my washing machine finishes. In my case, this is triggered using Meross energy monitoring smart plugs (sponsored link).

So now, as well as sending a notification, it also triggers a broadcast (within the time constraints).

Other things you can do with Google Home

Once you have the Google Asssistant SDK integration installed in Home Assistant, you can use scripts to run any other command that you would say to Google Home. You could, for example, create a button on your Home Assistant dashboard, which triggers the text command ‘play Never Going To Give You Up by Rick Astley on Spotify‘ if you want to automatically rickroll the other occupants of your house. It can also control smart home devices which work with Google Assistant, but do not yet have a Home Assistant integration.

Enjoyed reading?

You can sign up to receive a weekly email with new blog posts - just pop your email in below. You can unsubscribe at any time.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.