Hey Google, turn on the lights - room dependent

Background

If I’m in my den and say

Hey Google, turn off the Den

That will turn off DenSpotlight, Desk, DenLiquor.

Now I’m in bed and say

Hey Google, turn off the bedroom.

That will turn off MBRspot, MBAspot, MBAshower, MBAtub.

Now for both the MBR, and Den, I have already defined scenes that turn on/off those lights to a specified light level using a specific ramp rate. These are not HomeAssistant scenes, however I can control them with HA. For every desired room I created a switch, so this example would have:

  • switch.Den
  • switch.MBR

So now not only can HA use these switches to turn on/off a room’s mise en scene, use google_assistant: to expose these switches to Google Assistant (Alexa, Siri, HaHub, ISY, etc) and say:

Hey Google, turn on the Den

Google picks that up and then calls my HA which turns on switch.Den

The problem

I have Google speakers everywhere. Bedrooms, offices, kitchen, living room. So I can toggle every switch from any location.

Naming switches, lights, scenes is an art form. You want them to be short and recognizable. And if you want to use a personal assistant like Google’s, you better be able to communicate that to Google. And this is why I use switch.XXX.

Sounds like you can control all these “switches” with just your voice, what’s the problem?

You have to already know the switch names. When you come home stumbling buzzed, you can remember kitchen, good job. Is Den really that hard to remember? I’m not judging. What everyone can remember is LIGHTS.

Hey Google, turn on the lights.

If you haven’t figured it out just yet, spolier alert, there is no switch.lights because “lights” is a poor name. Each room has a different configuration of what “lights” means.

Can Google communicate to HA which device GA responded to? So if I had 5 Google speakers, and someone said > Turn on the lights, when switch.lights events fire in HA I can discover which speaker responded, and then react appropriately.

Didn’t read it all. Perhaps that was a mistake, but I think what you want is to create rooms in the google home app.
When you have rooms in the GH app then you can add all the lights and switches you want to turn off in that room with voice.
Keep in mind devices that should not toggle with lights should not be in the rooms.
So don’t add remote switches or something like that.

When you have a room with all the lights then you can in that room ask the google device (that is also placed in that room in GH app) to turn off the lights and it will know this room should be turned off.

No, I don’t want to use Google Rooms. And even if I did, the same problem remains. You have to already know the room name

In that case I don’t think you can solve this.
When you create custom routines then you can see what device was used.
But I doubt you can create a routine that uses the words “lights” and “turn off” without it triggering the built in command.

I think Hellis81 is rights, I have google speakers and displays all over the place and if I am in the dining room and I just say turn the lights on and that dining room display is the one that hears me, then just the dining room lights go on, I set up the areas in HA and Google put them in the correct rooms, give or take a couple. Now as I walk in I can say “Hey Google - Lights on” and if I am n the hallway the hallway lights come on, the problem is sometimes the dining room one hears me first.

No the problem goes away because Google knows which lights are in the same room as the speaker. Also, if you use areas in home assistant, I’m fairly sure it will automatically maps to rooms in Google.