This integration is a copy of Google Assistant SDK integration with the following additional features:
- HTML responses as text from commands to Google Assistant
Due to a bug in the Google Assistant API, not all responses contain text, especially for home control commands, like turn on the lights. The workaround, per the linked bug, is to enable HTML output and then parse the HTML for the text. Because the core integrations are not allowed to parse HTML, this custom integration is needed.
Due to a recent change by Google (October 2025), many users are experiencing empty responses for smart home commands (e.g., "what is the status of the lights?"). This issue is tracked in #36.
The solution is to re-authenticate using Desktop app OAuth credentials instead of the default Web app credentials. This change has been confirmed to restore functionality for affected users.
To fix this, you must follow the steps below to create and apply Desktop app credentials.
Create and Apply Desktop App Credentials
- Successfully installed the Google Assistant SDK Custom integration.
- Navigate to Google Developers Console > Credentials.
- Select the project you created earlier from the dropdown menu in the upper left corner.
- Select Create credentials (at the top of the screen), then select OAuth client ID.
- Set the Application type to Desktop app and give this credential set a name (like "Home Assistant Desktop Credentials").
- Select Create.
- In the OAuth client-created screen, select Download JSON.
- Rename the downloaded file to
client_secret.json. - On your Windows, Linux, or Mac machine, download Python if you don't have it already.
- Open the terminal (on Windows, select Start and then type
cmd). - In the terminal, run the following commands (preferably in a Python virtual environment):
python -m pip install --upgrade google-auth-oauthlib[tool]- Under Windows:
google-oauthlib-tool --scope https://www.googleapis.com/auth/assistant-sdk-prototype --scope https://www.googleapis.com/auth/gcm --save --client-secrets %userprofile%\Downloads\client_secret.json - Under Linux:
google-oauthlib-tool --scope https://www.googleapis.com/auth/assistant-sdk-prototype --scope https://www.googleapis.com/auth/gcm --save --client-secrets ~/Downloads/client_secret.json - Result: A browser window will open, asking you to select the account to continue to the cloud project you created earlier.
- Under Windows:
- Once you select the correct account, select both checkboxes:
- Use your Google Assistant: broad access to your Google account
- Send information to your Android device
- Select Continue.
- Result: If everything was successful, you will get a The authentication flow has completed. You may close this window message in your browser.
- In your terminal you will see the path where the credentials were saved. For example:
credentials saved: C:\Users\user\AppData\Roaming\google-oauthlib-tool\credentials.json
- Open the
credentials.jsonin a text editor. Keep it open since you will need to copy several values from it. - In the file editor of your Home Assistant, open
/config/.storage/application_credentials.- Locate the entry for
google_assistant_sdk_customand modifyclient_idandclient_secretto match the ones fromcredentials.json. - Save the file.
- Locate the entry for
- Open
/config/.storage/core.config_entries.- Locate the entry for
google_assistant_sdk_customand modifyrefresh_tokento match the one fromcredentials.json. - Save the file.
- Locate the entry for
- Restart Home Assistant.
- Verify the changes. After restarting, confirm your edits in
/config/.storage/application_credentialsand/config/.storage/core.config_entriesare still present. Home Assistant can sometimes overwrite manual changes to these files. If your changes were reverted, try stopping Home Assistant completely, applying the edits again, and then starting it.
- Add custom integrations repository:
https://github.com/tronikos/google_assistant_sdk_custom - Select "Google Assistant SDK Custom" in the Integration tab and click download
- Restart Home Assistant
- Enable the integration
- Copy directory
custom_components/google_assistant_sdk_customto your<config dir>/custom_componentsdirectory - Restart Home-Assistant
- Enable the integration
- Go to Settings / Devices & Services / Integrations. Click + ADD INTEGRATION
- Search for "Google Assistant SDK Custom" and click on it
Following example allows controlling Nest Guard and getting its status in a text helper. A similar approach, especially the automation that polls the status, can be used for other devices, for which a template, e.g. template light, might make more sense. Here a Template Alarm Control Panel wouldn't work because Google Assistant doesn't allow disarming Nest Guard.
Create a text helper with:
Name: Nest Guard Status
Icon: mdi:shield-home
Entity ID: input_text.nest_guard_statusCreate following scripts:
nest_guard_refresh:
alias: "Nest Guard: Refresh"
sequence:
- service: google_assistant_sdk_custom.send_text_command
data:
command: what is the status of nest guard
response_variable: response
- service: input_text.set_value
data:
value: "{{ response.responses[0].text }}"
target:
entity_id: input_text.nest_guard_status
mode: single
icon: mdi:shield-refresh
nest_guard_away:
alias: 'Nest Guard: Away'
sequence:
- service: google_assistant_sdk_custom.send_text_command
data:
command: Set Nest Guard to away and guarding
- service: script.nest_guard_refresh
data: {}
mode: single
icon: mdi:shield-lock
nest_guard_home:
alias: 'Nest Guard: Home'
sequence:
- service: google_assistant_sdk_custom.send_text_command
data:
command: Set Nest Guard to home and guarding
- service: script.nest_guard_refresh
data: {}
mode: single
icon: mdi:shield-homeCreate automation:
alias: "Nest Guard: status"
description: ""
trigger:
- platform: time_pattern
minutes: "10"
condition: []
action:
- service: script.nest_guard_refresh
data: {}
mode: queued
max: 10Add the following Entities card in the lovelace dashboard:
type: entities
entities:
- input_text.nest_guard_status
footer:
type: buttons
entities:
- entity: script.nest_guard_home
show_icon: true
show_name: true
- entity: script.nest_guard_away
show_icon: true
show_name: true
- entity: script.nest_guard_refresh
show_icon: true
show_name: true(You will have to replace google_assistant_sdk.send_text_command with google_assistant_sdk_custom.send_text_command).