Trigger automation from Google Assistant based on room


I’m in the process of studying Home Assistant to hopefully upgrade my entire house to be smarter and implement HA in the process. The assistant I’m currently using is Google but I’m open to switch if there’s a good reason for it.

One thing that I always wanted to do is to trigger different routines based on the room I spoke the command from. Let’s say I have a “relax” scene in google that I trigger when I say “Hey Google, relax”. Right now, in Google I can only have one routine which triggers with “Hey Google, relax”. What I would like to achieve in HA is having multiple “relax” automations/scenes/scripts/routines (still have to figure out the infrastructure here) so I can just say “Hey Google, relax” but it’s gonna trigger different lights if let’s say, I trigger it from the living room instead of my own bedroom.

In theory, the plan is to get the voice, analyze it, understand which routine to trigger and then check from which Google device that command came from and act accordingly.

Is it something that’s doable with HA?


Right now, I’m controlling blinds with Shelly 2.5’s. Let’s say I wanna have a scene where the blind is set to be almost closed but to allow some sun through. At the current state of things, if I wanna avoid saying “Hey G, open the window blind at x%” I have to make a routine in Google Home with a voice trigger like “dim the sun” and have that set the percentage. Now, I have several blinds in several rooms in my house, if I wanna say the same thing in all the rooms I would have to create a routine per room with a unique trigger for every state of the blind that I want that has to state the name of the particular blind in the room, the room of the blind and the percentage (“Hey G, dim the sun with the small blind in the living room”) which is impossible since Google Home has a character limit for voice commands. If what I wanna do is achievable I can just say “Hey G, dim the sun with the small blind” and that will trigger a script in HA that will understand “dim the sun” and “small blind” and will also recognize in which room the device that generated the request is.

1 Like

Stumbled here with same scenario. Did you find a solution?

I’m not taking credit for it but this works:
Script to send actions to the right Google Home (based on voice commands) - Share your Projects! - Home Assistant Community (

What you do is create a routine in GH that runs a script or some how trigger an automation.
The last step in the routine is to start ambient sound on the speaker.
The automation then start with looking at what speaker is playing the ambient sound and that way you know what room it is/what speaker you spoke with.