Google Assistant configuration

The Google Assistant integration allows users to control the entities via the Home Assistant Smart Home skill for Google Assistant. This means that you can say things like “Ok Google, turn on the kitchen light” to control your local Home Assistant.

To use this integration, you need to have:

  • The cloud component set up. Learn more
  • Have Cloud component Google Assistant support enabled. This can be done on the Cloud page inside Home Assistant.
  • A Google Assistant enabled device like the Google Home or a mobile phone running Google Assistant.
  • Activated the Home Assistant Smart Home skill for Google Assistant.
    • If you have a Google Home device, use the Google Home app, select the plus icon in the upper left corner, and then Set up device, and then Works with Google. Then search for Home Assistant Cloud by Nabu Casa and add it.
    • If you only have a mobile phone, launch Google Assistant, select the three dots menu. Under Settings you’ll find Home Control. There you can add Home Assistant Cloud by Nabu Casa using the Add devices option.

UI Configuration

Entities can be configured through the UI by using the “manage entities” link within the Google Assistant settings card. From here you can see how many entities are exposed in the upper right corner, as well as toggle domains on or off in order to expose or unexpose them all at once. You can then expose an individual entity from a domain, for example. Your choices are then synced automatically.

Available domains

Currently, the following domains are available to be used with Google Assistant:

  • alarm_control_panel
  • binary_sensor (anything that represents open/close, like doors, windows, locks)
  • camera
  • climate
  • cover
  • fan
  • group
  • input_boolean
  • input_select (helper)
  • light
  • lock
  • media_player
  • scene
  • script
  • sensor (temperature only)
  • switch
  • vacuum

Secure Devices

A secure device cannot be opened by Google Assistant unless a secure_devices_pin is set up. The following domains cover secure devices: lock, alarm_control_panel and covers with device types garage and door.

To allow opening, set the secure_devices_pin to something and you will be prompted to verbally provide this when opening the device. Closing and locking these devices does not require a pin.

For the Alarm Control Panel if a code is set it must be the same as the secure_devices_pin. If code_arm_required is set to false the system will arm without prompting for the pin.

Media Player Sources

Media Player sources are sent via the Modes trait in Google Assistant. There is currently a limitation with this feature that requires a hard-coded set of settings. Because of this, the only sources that will be usable by this feature are listed here. An example command would be, ““Hey Google, change input source to TV on Living Room Receiver”

Room/Area support

Entities that have not got rooms explicitly set and that have been placed in Home Assistant areas will return room hints to Google with the devices in those areas.

Climate Operation Modes

There is not an exact 1-1 match between Home Assistant and Google Assistant for the available operation modes. Here are the modes that are currently available:

  • off
  • heat
  • cool
  • heatcool
  • fan-only
  • dry
  • eco
  • auto

After setting up the cloud, if you make any device changes such as changing the name or adding a new device simply say “Ok Google, sync my devices” to get the changes to show up.

Local communication

Google devices can send their commands locally to Home Assistant. This allows Google to respond faster to your commands. If a local connection is unavailable it will automatically fallback to the cloud.

Google Assistant will consider sending commands locally if it does not involve a secure device.

Your Home Assistant instance needs to be connected to the same network as the Google Assistant device that you’re talking to. The Google Assistant device will discover your Home Assistant instance via mDNS discovery (UDP broadcasts).

Your Home Assistant instance should not have the HTTP integration configured to use an SSL certificate (docs). This is necessary because the Google device will connect directly to the IP of your Home Assistant installation and will fail if it encounters an invalid SSL certificate.

The Google device still needs to be connected to the internet to be able to sync entities via Home Assistant Cloud, get credentials to establish a local connection and as a fallback for secure devices or if your Home Assistant instance cannot be reached.

Manual Configuration

You can use configuration.yaml to configure the entities that are being shown to Google Assistant and how they are exposed.

# Example configuration.yaml entry configuring Google Assistant
cloud:
  google_actions:
    filter:
      include_entities:
        - light.kitchen
        - light.kitchen_left
      include_domains:
        - switch
      exclude_entities:
        - switch.outside
    entity_config:
      switch.kitchen:
        name: Custom Name for Google Assistant
        aliases:
         - bright lights
         - entry lights
        room: living room

Configuration variables

google_actions:
  (map) (Optional) Configuration options for the Google Assistant integration.

  filter:
    (map) (Optional) description: Filters for entities to include/exclude from Google Assistant.
    include_entities:
      (list) (Optional) description: Entity IDs to include.
    include_domains:
      (list) (Optional) Domains to include.
    exclude_entities:
      (list) (Optional) Entity IDs to exclude.
    exclude_domains:
      (list) (Optional) Domains to exclude.

  entity_config:
    (map) (Optional) Entity specific configuration for Google Assistant.
    ENTITY_ID:
      (map) (Optional) Entity to configure.
      name:
        (string) (Optional) Name of entity to show in Google Assistant.
      aliases:
        (list) (Optional) Aliases that can also be used to refer to this entity.
      room:
        (string) (Optional) Hint for Google Assistant in which room this entity is.