Skip to content

Home Assistant Google Home — Complete Guide

DodaTech Updated 2026-06-24 3 min read

In this tutorial, you'll learn about Home Assistant Google Home. We cover key concepts, practical examples, and best practices.

Hook

You configure the Google Home or Nest integration in Home Assistant. Google says "Linking your Home Assistant account..." then fails. Or the integration shows "No devices found." Your Google Home app works fine, but Home Assistant cannot control it.

The Wrong Way

Enabling "Less secure app access" in Google settings or using a personal Gmail account with the wrong API scopes leads to authentication failures.

# BAD: Using personal Gmail with wrong OAuth scope
google_assistant:
  project_id: my-project
  client_id: my-client-id
  access_token: personal-gmail-token  # Wrong scope
Google Assistant: Authentication failed — invalid scope
Error: Access token does not have the required scopes

The OAuth token must include the correct Smart Home API scope.

The Right Way

Use the Google Cloud Console setup properly with the Home Graph API and the correct OAuth consent screen.

# 1. Create a Google Cloud Project
# https://console.cloud.google.com → New Project → Name: "Home Assistant"

# 2. Enable APIs:
# HomeGraph API
# Google Smart Home Assistant API

# 3. Create OAuth consent screen → "External" → Add scopes:
# https://www.googleapis.com/auth/smarthome
# 4. Generate OAuth credentials
# APIs & Services → Credentials → Create OAuth 2.0 Client ID
# Application type: "Web application"
# Authorized redirect URIs: https://my-hass.duckdns.org/api/google_assistant
# 5. In configuration.yaml:
google_assistant:
  project_id: my-project-id
  service_account: !secret google_sa
  entity_config:
    light.living_room:
      name: Living Room Light
      expose: true
# 6. Execute the cloud function to sync devices
docker exec hass python -m homeassistant.components.google_assistant --script sync
Sync completed: 12 entities sent to Google Home
Google Home app shows all devices ✓

Prevention

  • Use a service account (JSON key) instead of OAuth 2.0 tokens.
  • Create a dedicated Google Cloud Project for Home Assistant.
  • Ensure the HomeGraph API is enabled in the project.
  • Set expose: true on each entity you want Google to see.
  • Use the google_assistant command-line sync after configuration changes.

Testing Your Fix

After applying the fix, run this verification to confirm everything works:

# Verify the tool is responding
command -v tool --version

Create a simple test script and run it. If the output matches your expectations, the fix is complete. If errors persist, review each step above -- the problem is often a missed configuration detail.

Common Mistakes with assistant google home

  1. Placing the wildcard pattern first in case expressions, making all subsequent patterns unreachable
  2. Using head and tail instead of pattern matching, causing runtime errors on empty lists
  3. Forgetting that lazy evaluation defers computation until the value is forced, causing space leaks with unevaluated thunks

These mistakes appear frequently in real-world HOME code. DodaTech's contributors have identified these patterns through analysis of open-source projects and production systems.

Practice Exercise

Write a pure function that safely divides two integers using Maybe, then test it with edge cases like division by zero and negative numbers.

This exercise reinforces the concepts covered in this guide. Try implementing it before checking online solutions.

FAQ

Does Google Home integration require a Google Cloud Project?

Yes — Google Home integration with Home Assistant requires a Google Cloud Project with the HomeGraph API enabled. The project requires a billing account but stays within the free tier.

Why are some devices not showing in Google Home?

Only entities with expose: true are sent to Google Home. Also, Google only supports certain domains (light, switch, lock, sensor, etc.). Check the entity's domain and set expose: true.

Can Home Assistant control Google Home speakers?

Yes — use the google_cast media player integration to control Chromecast and Google Nest speakers, or the google_assistant integration for voice commands via Google Home.


DodaTech — Google Home that listens to your smart home.

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro