Expose Vacuum to Google Assistant

Hey,

I have exposed my covers to Google Assistant and now I am trying to do the same with my vacuum (XIAOMI) to get some voice controls. I got it to show up as a switch and can turn it off and on. Is there a way to get some more functionality like spot-cleanup etc. to work with another type of google_assistant_type ?

Thanks

How did you make it into a switch?

you can expose the vacuum via customisation as a switch.

homeassistant:
  customize:
    vacuum.xiaomi_vacuum_cleaner:
      friendly_name: 'Robot cleaner'
      google_assistant: 'true'
      google_assistant_type: 'switch'
      aliases:
        - robot
        - robo

Thanks! Didn’t know the aliases worked with Google also, that’s useful.

There are introductions at the google home support page to control robot vacuums (see Step 5):

https://support.google.com/googlehome/answer/7073578

Question is how to expose the component to google assistant to be identified as vacuum.

That would be better, as a switch it works fine with “on” for start and “off” for dock, but proper Google integration would apparently also add pause, stop and dock, and asking if it’s running. And more flexible commands.

Just added this for a Xiaomi Vacuum - Works fine as a switch and hoping to see native vacuum support in a future revision. Does anyone know if theres a pr to have it added?

Also looking forward for the native integration, would be awesome.

There is a feature request for that, may be you can also vote for it

1 Like

I upvoted that request, also i am wondering about the list of supported devices. I remember seeing that one too when I first set everything up, but cannot seem to find it anymore. The problem is: covers are supposedly exposed and they are, my cover shows up in Google Home. But they are seen as a switch. So saying “Close the cover” actually works, but “Open the cover” does not. I need to say “turn on the cover”. I think I read somewhere that right now, that its only possible to control light and switch-functionality with google home through HA (but would love someone to confirm that).

Hello,

digging this topic up again since the vacuum cant be exposed as a switch with the new update for the component which got rid of the “type” feature.I think it should be possible with an input_boolean and an automation, I will try my luck and post the results here!

It works as expected. Create an input boolean --> create two automations with trigger on state switch from on to off and vice versa --> expose the boolean to google!

You could also create a template switch and expose that as well. No automation needed in that case.

That is indeed a better way! Works well with less scripting!

My template incase someone wants to do the same sometime(it takes a moment for the switch to turn on/stay on after switching it on, guess its just the response time of the vac):

- platform: template
  switches:
      robert_switch:
        entity_id: vacuum.robert
        value_template: "{{ is_state('vacuum.robert', 'on') }}"
        turn_on:
          service: vacuum.turn_on
          data:
            entity_id: vacuum.robert
        turn_off:
          service: vacuum.turn_off
          data:
            entity_id: vacuum.robert

I have done it as describled on my customization.yaml file.

It shows on my HA State but I doesn’t list on my google assistant devices list. Have already synced, removed and added again my [test]Device and nothing… any tips?

image

you can’t expose the vacuum component to GA anymore because the type feature was removed. So you have to use a template switch as explained by @d0nnae in the post before your post…

Is there any news on this?

I see on site below, that vacuum is supported a domain, but can you also do zone map features?

you can create a script or use a webhook in automation, that is how I am using it with neato

Yes, I am indeed now exposing the scripts, but native function would be nicer :wink:

looks like it should be doable now :slight_smile: didn’t notice they updated the site

https://developers.google.com/actions/smarthome/traits/startstop

Oh, that’s nice…
Seems also blinds open/close are now possible…

Who to ask for this development?