Google Assistant including specific devices

I’ve got the google_assistant component working for lights but I’d like to add some specific switches without adding all switches. The following is my configuration. Can someone help tell me what I’m doing wrong? Thank you much

google_assistant:
  project_id: my-project_id
  client_id: !secret google_assistant_client_id
  access_token: !secret google_assistant_access_token
  api_key: !secret google_assistant_api_key
  exposed_domains:
    - light
  entity_config:
    switch.fan_light:
      name: Fan Light
      expose: true

This is correct, did you run a sync to update google assistant? Make sure you run that service to get the new device to show up.

You forgot to define the type of exposure:

  project_id: my-project_id
  client_id: !secret google_assistant_client_id
  access_token: !secret google_assistant_access_token
  api_key: !secret google_assistant_api_key
  exposed_domains:
    - light
  entity_config:
    switch.fan_light:
      name: Fan Light
      expose: true
      type: switch

Type can be light, switch, script, media_player (maybe more but I mainly use those)

Edit your config file, restart and do not forget to sync Devices

type is not required if you look at the docs…more than likely the sync did not occur.

Are you referring to calling ‘google_assistant.request_sync’ from the Services page? I didn’t know it was necessary as I didn’t have to do it initially. I’ll give that a shot when I get home.

It was not there initially, it was added later on in a blog post. When you setup the integration it does an initial sync but never does it again. Alternatively you can say “Ok Google sync my devices” from your phone or google home as well :wink:

That worked. Thanks so much!

I’m having a similar issue. Initially, I exposed a few domains: light, switch, script. This worked and it brought all of these into the Google Home app as expected.

I am now trying to get more control over which entities appear in GA, so have now removed the domains and am adding in the single entities that I want to use.

However, I’ve restarted home assistant and ran the google_assistant.request_sync as suggested above, but all the old entities still appear in the home app, rather than the selected new ones.

I’ve also tried to ask google to ‘sync my devices’ but after spinning for several seconds, it responds with “sorry, I can’t help with that yet”

Any thoughts?

You’ll probably need to unlink and relink in the Google Assistant App.

Also, be aware, specifying the room is now possible.

Like this:

# Google Assistant
project_id: !secret ga_project
client_id: !secret ga_client
access_token: !secret ga_access
agent_user_id: !secret agent
api_key: !secret api-ga
exposed_domains:
  - switch
  - light
  - scene
entity_config:
  light.yeelight_white_34ce00882e27:
    expose: false
  light.yeelight_white_34ce00887db6:
    expose: false
  light.office_light_group:
    expose: false
  light.lounge:
    room: lounge room

Just a part of my Google Assistant config. (I’m split it off from configuration.yaml into it’s own file)

Thanks for the reply David. Where do I unlink the app from?

BTW, good idea creating a separate file for this…I can see it getting very long

Go into Google Assistant > Settings > Home Control
Then click the + in the bottom right corner, click on your App that you created and you can unlink it. [test]your name

Then click on it to link it again.

When google is unable to sync, this seems to be the only way to fix it. It’s great now you can specify the room in home assistant as now when you delink it, everything is automatically in the right room.