Bridge the gap between YAML configuration and UI controls.
Tired of manually adding entity IDs to the google_assistant.entity_config key in your configuration.yaml, while cloud subscribers get to configure them easily via the UI?
This custom component solves that problem. It automatically exports the entities you configure in Home Assistant’s UI (under Settings > Voice assistants) to a local file, including their aliases and Room/Area assignments. This allows you to use the robust local Google Assistant integration (YAML) combined with the ease of use of the UI.
-
Zero-Config Automation
No external automations required. The component automatically detects changes in your settings, generates the file, and notifies you when a restart is needed. -
UI-Driven Configuration
Configure your devices in the HA UI; this component generates the necessary YAML configuration for you. -
Smart Room Sync
Automatically maps Home Assistant Areas to Google Home Rooms. If an entity doesn’t have an area assigned, it intelligently checks the parent device’s area. -
Strict Filtering
Designed to work perfectly withexpose_by_default: false. It explicitly addsexpose: trueto the generated file for items you toggled on, ensuring Google actually sees them.
This component assumes you have already set up a working local Google Assistant integration via YAML.
For setup instructions and current requirements, see the official Home Assistant documentation:
https://www.home-assistant.io/integrations/google_assistant
Note on UI Availability:
To use the Expose controls in the UI (Settings > Voice assistants), the Home Assistant Cloud component is technically involved in the background to render the menu. You generally need to be logged in under Settings > Home Assistant Cloud, but you do not need an active subscription.
- Open HACS in Home Assistant.
- Go to Integrations.
- Click Explore & Download Repositories (the big + button).
- Search for Google Assistant Auto-Expose.
- Click on the integration in the list and then click Download.
- Restart Home Assistant.
- Download this repository.
- Copy the
custom_components/ga_autoexposefolder into your Home Assistant
config/custom_components/directory. - Restart Home Assistant.
Add the following line to your configuration.yaml:
ga_autoexpose:Update your existing google_assistant configuration to use the generated file.
Recommended configuration:
google_assistant:
project_id: YOUR_PROJECT_ID
service_account: !include service_account.json
report_state: true
# Set this to false to have full control via the UI (Strict mode)
expose_by_default: false
# These domains act as a filter if you enable expose_by_default.
# If expose_by_default is false, these are ignored.
exposed_domains:
- switch
- light
- climate
# This is where the magic happens
entity_config: !include exposed.yamlNote:
The exposed.yaml file will be created automatically in your config folder after the first run.
Simply use Home Assistant as you normally would. The integration runs in the background.
- Go to Settings > Voice assistants > Google Assistant.
- Toggle Expose on or off for any device.
- Wait ~30 seconds (the integration debounces multiple edits).
- You will receive a Notification in Home Assistant with a direct link to restart your system.
If you want to force an update immediately without changing settings, run the service:
- Service:
ga_autoexpose.export_entities
- Configure
Toggle Expose on your entities in the UI. - Wait
Wait for the Google Assistant Config Changed notification. - Restart
Click the link in the notification to restart Home Assistant. - Sync
Say: “Hey Google, sync my devices”.
Feel free to open issues or submit pull requests if you have ideas for improvements.
MIT License