How do you expose to Google Assistant only certain items?

BTW, I’m not sure of the etiquette here. There is an Older post here which talks about my question. How old is too old in order to add on to a subject?

In any case, I have several google home speakers that appear in Home Assistant, as well as a few switches that are already in Google Assistant because they were linked from another hub. I used the MyQ component to add my garage door (it’s not controlled by any other hub) and it’s called cover.garage_door_opener. I want to be able to use Google Assistant to control that. How can I prevent everything from being added to Google Assistant when I sync by default, and specify individual items to sync?

Do I use

google_assistant: #and some other settings

Or

 homeassistant:
       customize:
            cover.garage_door_opener:   #is this syntax correct with “cover.”?
               google_assistant: true
               google_assistant_name: my garage door
            Speaker1:
               google_assistant: false
            Light1:
               google_assistant: false

Or is it a combination of both? Do I need to setup a Google Devleoper Project? (I hope not)

depending how many entities you want to expose/hide, you have sort of 2 options:

  • expose everything and manually list entities you want to hide, OR
  • expose nothing and manually list entities you want to expose (my approach)

check the settings on this page

Feel free to also check my config for an example to get you started:

1 Like

Do you still have to link Home Assistant to Google like other hubs with this approach?

You have 2 options, the “old” way using the link I previously provided, or us the HA cloud and the setup is a bit different:

@lolouk44 just making sure I understand:

  1. I were to use the “old” way, that would require me to create a google “project”, correct?

  2. The second method does not require a google developer project, and it takes every device found in Home Assistant but I can use the cloud: option and exclude specifc devices?

  1. you’re correct
  2. yes and yes. do bear in mind that the cloud option will become a chargeable service/offer eventually

As in a fee charged by the home assistant team? Is that because the cloud option requires resources? By the way, I used #2 and I just specified the single entity I wanted to include and it worked the first time! Does it exclude entities by default?

This is what I added:

HA Cloud was announced end of last year. this blog explains everything and why it’s not free:


I don’t have HA cloud set up so I don’t know if it includes or excludes everything by default, but glad to hear you made it work :slight_smile:

I’m torn about paying $60 a year for minimal features. Not that I can’t afford it, but I’d rather donate the money for utility gained. I might do the developer account just for fun.

@lolouk44, silly question, but how do you include Google_Assistant.yaml from configuration.yaml? Is it:

google_assistant: !include google_assistant.yaml

That’s exactly how :slight_smile:

project_id: !secret GAproject_id
client_id: !secret GAclient_id
access_token: !secret GAaccess_token
api_key: !secret GAHomeGraph_key
expose_by_default: false
entity_config:

  input_boolean.movies:
    name: "Movies"
    room: 'Living Room'
    expose: true

So I want to expose a cover (garage door opener). Is the format as follows?

cover.garage_door_opener: 
    name: 'My Garage Door'
    room: 'My Garage'
    expose: true

That looks OK.just make sure the indentations are correct

@lolouk44, one thing I don’t understand are the ID, token, and key values

google_assistant:
  project_id: someproject-2d0b8
  client_id: [long URL safe random string]
  access_token: [a different long URL safe random string]
  agent_user_id: [a string to identify user]
  api_key: [a Homegraph API Key generated for the Google Actions project] 

What do you do with the access_token? The docs aren’t really clear on this. While you generate them and put them in the HA config, aren’t they needed somewhere on the Google side?

in the docs it tells you how to generate these:


@lolouk44 sorry, I updated my question. I did generate them but don’t know what to do with the access_token. I’m at the point where I’m using Google Assistant to add [test] your app name but I’m getting an error 500.

Ah, silly me. I used port 8123 in the project settings but am using nginx and 80,443.

save the tokens in your config. it’s all going to happen behind curtains from this point when it comes to tokens,
If you get an error when trying to connect, it’s because something went wrong at an earlier stage.
Try and double check each step to see if you missed anything, if that fails start again.
This setting up is strange in that if you miss just one step, sometimes the only way is to start again from scratch, happened to me a few times already if that makes you feel better :slight_smile:

Good advice. It’s easier to start over sometimes. But I’ve still no idea what I’m supposed to do with the access token. I put in home assistant, but is there a place where it goes into the google project? Or is it just used to identify home assistant?

it’s just an id/token for access that’s required.
I don’t remember how it’s used, I just know that without it, it won’t work :wink:

Is there a way to remove a deleted project from showing in Google Assistant? Under “Add New” it shows [test] my test app. But it no longer exists as a project