Links on the site may earn us an affiliate commission. Learn more.

Home Assistant cloud allows controlling entities from outside your home network without having to expose your Home Assistant to the Internet. On this guide, you will learn how to integrate Google Assistant with Home Assistant Cloud. Also, how to configure what entities can be controlled via Google Assistant, and how to customize the response when a command is given.

Sign up for Home Assistant Cloud

Open Home Assistant and on the sidebar, click on Configuration and then Home Assistant Cloud. If this is the first time using the Cloud service, you can sign up and get a 30 days free trial. After that, it’s $5 month which is not a lot for all the features that you get. Plus the security that you don’t have to expose your Home Assistant to the Internet.

Enable Hass.io skill

After you’re signed in, enable the Google Assistant integration. Then you need to enable the Hass.io skill for Google Assistant. Open the Google Home app on a mobile device. Tap on AddSet up device, and then tap Have something already set up?. Search and select hass.io. Then, sign in to Home Assistant Cloud, and tap on Allow Access.

After Hass.io is linked, another page comes up with some of the entities that you have in Home Assistant. To see a list of all your entities and assigned them to specific rooms, go back to the main Google Home Window. Then, go to AccountSettingsAssistant, and Home control.

How to control entities via Google Assistant

So Google Assistant is now integrated with Home Assistant, and you can start controlling your entities from any Google Assistant device. To trigger entities that have an on and off switch, for example, a light, you can just say “Hey Google, turn on the living room light.” And the Google Assistant would turn the light on and then provide an appropriate response.

However, entities like automations or scripts, for example, a script to lock your computer, you wouldn’t be able to just say, “Hey Google, lock the computer.” You would actually have to say “Hey Google, activate” and then the name for the script. The response back would be something like, “Ok, activating PC lock.”

There are a couple of ways that you can customize this and make it simple to execute a script or automation. For example, you can use Routines in Google Assistant to customize the way you ask to execute an action. But, you wouldn’t be able to change the Assistant’s response. However, you can use IFTTT to customize both the way you ask for something and also the way Google Assistant response back.

How to use Routines to trigger Scripts and automations

Let me show you an example of how to set up both methods using a script to lock my computer.

If you want to use routines, on the Google Home app, tap on the Routines icon, Manage routines, and then, the “+” Plus icon to create a new one. Enter the phrase or phrases that you would like to say to trigger the command. Then, tap on Add action and enter the actual phrase that would trigger the script or the automation entity. On this example, it would be Activate PC Lock. Save the changes and then, any time you say the phrase on the routine, it would execute the action that was set up.

How to use IFTTT to trigger Scripts and automations

To use IFTTT to customize the way Google Assistant response back, you would need first to set up the following in the automations.yaml file:

- alias: 'IFTTT'
  trigger:
    platform: event
    event_type: ifttt_webhook_received
    event_data:
      action: call_service
  action:
    service_template: '{{ trigger.event.data.service }}'
    data_template:
      entity_id: '{{ trigger.event.data.entity_id }}'

Then, on the Home Assistant Cloud page, enable the IFTTT webhook. After that, go to the IFTTT page and click on New Applet. Then, click on This, search and select Google Assistant, and select Say a simple phrase. Now, enter the phrase or phrases that would trigger the script or the automation entity. Then, on the bottom, enter the phrase that you would like the Google Assistant to say in response. Click on Create Trigger, Then click on That, search and select Webhooks, and select Make a web request. Now, copy the IFTTT webhook from the Home Assistant Cloud page and paste it in the URL field on the IFTTT page. Change the Method to Post, the Content Type to Application/json, and then under Body, enter the following to trigger the specific Home Assistant entity: { "action": "call_service", "service": "script.pc_lock" } After that, click on Create action and then Finish.

Now, if you put it to the test, “Hey Google, lock computer” it runs the script to lock the computer, and it also gives a better response.

Control what entities can be exposed to Google Assistant

The last thing that we’re going to look at is how to configure in Home Assistant the entities that can be controlled from Google Assistant, and which ones to exclude. Also, how to change the name of the entities, add aliases and assign them to specific rooms.

In the Home Assistant config folder, create a new file and name it cloud.yaml. Then, in the configuration.yaml file, add the following to the cloud component: cloud: !include cloud.yaml

After that, open the cloud.yaml file and add the following:

google_actions:
  filter:

Under filter, there are a few variables that you can use. So, depending on your setup, and the number of entities that you would like to expose to Google Assistant, you can either use include_entities which would only expose the list of entities that you specify, or exclude_entities, which exclude the entities in that list. Alternatively, you can either use include_domains or exclude_domains which can either include or exclude all entities inside of a specific domain.

# cloud.yaml example
google_actions:
  filter:
    include_entities:
      - light.living_room_light
      - light.bedroom_light
      - light.desk_light
    exclude_entities:
      - input_boolean.lr_number_pad
      - input_boolean.lr_hdmi
      - input_boolean.lr_playback_buttons
    include_domains:
      - switch
      - light
    exclude_domains:
      - script
      - automation

The domains that are currently available with Google Assistant are:

  • group
  • input_boolean
  • scene
  • script
  • switch
  • fan
  • light
  • cover
  • media_player
  • climate

Configure how entities are exposed to Google Assistant

To configure how entities are exposed to Google Assistant, you can use the variable entity_config. With this, you can change the entity’s name, add aliases and also specify the location of the entity within the home.

  entity_config:
    light.desk_light:
      name: Desk light
      aliases:
        - office light
        - desk lamp
      room: Office

I suggest setting this option for the entities exposed to Google Assistant. So like that if you unlink and then relink the Hass.io skill to Google Assistant, it would automatically set all the entities to specific rooms. Otherwise, you would have to assign them via the Google Home app manually.

After you finish making changes to the cloud.yaml file, restart Home Assistant and then sync the updates to Google Assistant by simply asking, “Hey Google, sync my devices.”

Want to support my work?