Setting up Google Actions for Assistant

Is for sure coming for Alexa (press release from Amazon) and in some forum I red is coming for GH too. Will see

@Nytram: To make a group behave as a light chane the mapping component in google_assistant/smart_home.py to say that groups will show up as lights in Google Home:

MAPPING_COMPONENT = {
    group.DOMAIN: [TYPE_LIGHT, TRAIT_ONOFF, None],

Then change in google_assistant/http.py in the handle_execute function if the domain is group change it to light just before the async call:

if domain == 'group':
    domain = "light"
success = yield from hass.services.async_call(

I will open a pull request here shortly…

2 Likes

Does GA process light and switch differently? If yes, do you think make group as switch is more appropriate?

I’m not totally sure. I often use “Hey Google, set [group name] to 50%” which I would think only works on a light.

Edit: Actually, I just tried it and despite being exposed as a light, it does not work to say "Hey Google, set [group name] to 50%. Google just says “It looks like those lights haven’t been set up yet”

Edit Edit: I modified smart_home.py again to enable the brightness/hue/etc settings but it still doesn’t let me set the brightness on the group.

I opened a pull request with the code. I will continue to work on seeing if I can get the brightness to be set by group. It works when I call the service manually.

1 Like

yes, but need to make more testing.

If the switch is for a light (like broadlink TC2 or Sonoff attached to a lamp) I would make it a light. I saw a workaround to make a switch be a light in GH (can’t remember where … too much information!!)

So TURN OFF THE LIGHT, will turn off all light and switch/light in that room

I think it has to do with the name. If the device name contains the word light, it will treat it as light even though it is a switch.

I’m still figuring out how the naming works. For example, if I add “Dining fan” and “Dining light” into a room called Dining Room and I said, “Turn on Dining Room” it would turn on both devices. However when I tried to do the same for Kitchen, it would respond “Sorry, I don’t know which kitchen you’d like to turn on”. Weird.

Sometimes I wish it would stop being such a smarty pants and act a bit like Alexa. When I say turn on a room, it would just turn on what I set for a group in HA.

Yes is all still a bit messy. But had similar problems with Alexa too. Having both Alexa and Google Assistant increases the complexity of remembering how all works and the setup

Meanwhile lot of cool hardware coming out

Lynky: Touchscreen Smart Home Hub with Google Assistant

1 Like

That is not google or alexa but the fact that you are using emulatedHUE… what you descibe how it works with alexa I had the same with GH & emulated HUE…

Now I changed to the new Google Actions and have the same experience… with emulatedhue I could turn a group on and off… now not…but I read it is still comming…

on the lights: the new implementation seems to make a decision based on light.kitchen or switch.kitchen… if I say “turn kitchen light on” it will only turn on the light.kitchen…

hope this makes sense…

Does anyone have and ideas why this setup works for my cell phone and Nvidia Shield assistants but not my physical Google Home?

Edit: I did a factory reset to the Google home and it started working. Thanks everyone who is helping in this thread.

1 Like

hi there, is it possible to run gaction cli through windows? or only in linux ? Do i have to have cygwin or somthing similar or can I run through cmd? I was able to initiate gactions, with gactions init and I create a action.json, I create a project.json but when I try to do the command to update my project.json I didn´t get anything back. What I did wrong?

hmm we can already archive similar to Lynky with Hass.io + Google Assistant addon + Dashboard

Hi @snowzach

Do you think there is any benefit in adding a customization option that lets the user how a group should be exposed?

For e.g.

group.lamp_group:
google_assistant_type: light
group.socket_group:
google_assistant_type: switch

Of course, this will add a bit of complexity to the code both during SYNC and EXECUTE.

Err no, it’s a av receiver

You can run it in Windows. That is what I did.

tks very much a put the command gactions update xxxx it apears a lot of thing but it didn´t show me any url am I missing something? and when I go to google console in the simulators i didn´t apear any action to simulate

How are you running it? Open command prompt and navigate to the directory where you have downloaded gactions and then run the command with the project ID. It will return a URL.

first a run the command gactions.exe and did open for me the commands then i put gactions update --action_package project.json --project xxxx and fullfiled with a bunch of things but none is the look what came back for me URL

Please Anyone?

Thanks. I will try again with emulated hue to see which one works better for me.

To me it’s a light in GH app