Google Assistant and covers

I have home assistant working with the google assistant component and everything works fine, except that my covers, which are my garage doors, show up in google assistant as lights. I can tell google to open the garage door and it works but if I tell google to turn on all the lights it also opens my garage door. Is there anyway to get my garage doors put into google assistant as anything other than a light? Thanks

Not at this time.

You can specify either light or switch for Google Assistant in the customize section with google_assistant_type. Here is my config for my garage door:

cover.garage_door:
      device_class: garage
      homebridge_cover_type: garage_door
      google_assistant: true
      google_assistant_type: switch
1 Like

Cool the switch thing worked. now my kids won’t accidentally open the garage doors!

I’ve currently got it working through Google Assistant via IFTTT and its Webhooks service, which calls my HA API directly when I ask Google Assistant to open or close the garage door. So far it’s been perfectly reliable. Happy to share my IFTTT config if you’re interested!

would love to see you IFTTT config.

In IFTTT you need to set up both Google Assistant and Webhooks. Then:

  1. New applet.
  2. If this - Google Assistant - Say a simple phrase.
  3. Enter three variations, ie “Open the garage door” “Open the garage” “Open garage”, and what you want the Assistant to say in response, ie “OK, opening the garage door”, then hit Next.
  4. Then that - Webhooks - Make a web request.
  5. URL in the following format: https://[your publicly accessible HASS url]/api/services/cover/open?api_password=[your HA API key]
  6. Method: POST
  7. Content type: Application/JSON
  8. Body: {“entity_id”:“cover.garage_door”}

Now say “hey google” and one of your phrases, and the door will open! Make another applet for close.

1 Like

thank you very much for your help but it’s not working for me because of the webhooks I think.
Google Assistant accepts my command but nothing happens.
I put https://[my publicly accessible HASS url]/api/services/cover/open?api_password=[my HA password] then Method: POST then Content type: Application/JSON and Body: {“entity_id”:“cover.garage”}. my entity_id is cover.garage not cover.garage_door.
I will try to see if I can find the problem. It the IFTTT activity log I see error" Ingredients
CreatedAt (none)" dont know what that is .

Google Assistant doesn’t support any devices that have a concept of open/close so you’re either stuck saying “turn on/off” or you can set up shortcuts in the assistant app to map “open the garage door” to “turn on the garage door”. It’s kind of a pain but that’s what I did.

1 Like

Just create shortcuts in the google home app, it only takes a minute.

1 Like

Mine is showing up as a light as well. The icon in Google Assistant is a bulb, and it opens when I say “Lights on”. My code is below…

I have restarted HASS, unlinked the account in the Google Home App.

cover:

  • platform: mqtt
    name: “Garage Door”
    state_topic: ‘smartthings/Garage Door/contact’
    command_topic: ‘smartthings/Garage Door/door’
    state_open: ‘open’
    state_closed: ‘closed’
    payload_open: ‘open’
    payload_close: ‘closed’
    retain: true
    optimistic: true
    google_assistant: true
    google_assistant_type: switch

I had to put the
google_assistant_type: switch
In customize to get it working.

1 Like

Yep, putting it in the customize.yaml did the trick.

Thanks Curt!

don’t forget that you still need to have the ‘cover’ domain exposed to Google

EG:

configuration.yaml

google_assistant:
  project_id: projecthere
  client_id: clienthere
  access_token: tokenhere
  api_key: apikeyhere
  exposed_domains:
    - switch
    - light
    - media_player
    - cover

customize.yaml

cover.left_garage_door:
  device_class: garage
  homebridge_cover_type: garage_door
  google_assistant: true
  google_assistant_type: switch


cover.right_garage_door:
  device_class: garage
  homebridge_cover_type: garage_door
  google_assistant: true
  google_assistant_type: switch

You could spend an hour or so trying to figure this out :wink:
*//note there are nbsp; characters if you copy paste

1 Like

Thank you :wink: I literally spent an hour…

Hi Marthocoo

I had similar configuration to control my garage door through google assistant. It was working fine with my old Home Assistant install, however once I upgraded my HA (0.78), the API calls are failing. It gives me 401 unauthorized error.

Reading up on it, it looks like the legacy api_password method is not supported anymore. Have you experienced the same issue? If so, do you have a working solution?

Please share the steps to make it work again.

Thank you

this works for me in the following format: https://[your publicly accessible HASS url]api/services/cover/open_cover?api_password=[your HA API key]

Hi all,

I’ve followed your istruction setting up covers as lights using customize domain:

  customize_domain:
    cover:
      google_assistant: true
      google_assistant_type: light

I can see that HA has this new attribute looking at the cover proprierties:

current_position: 0
friendly_name: Tapparella Stanza da Letto
supported_features: 11
google_assistant: true
google_assistant_type: light

But in my GH app covers appears still as switches.

Can someone please support me?

It seems Google added native support for blinds and shades.

I guess it should be easy to change how the covers are being synchronized with Google Home to be shown properly.

Direct link to developer documentation
https://developers.google.com/actions/smarthome/guides/

I’m sure it’s coming soon™