Set Integration
ha_set_integrationEnable, disable, add, or update a Home Assistant integration's options and config entries via config flows.
Instructions
Manage an integration (config entry): enable/disable, add, or update options.
Modes (pick one):
Enable/disable: entry_id + enabled.
Add integration: domain (+ config) — drives the domain's config flow, including menus and multi-step forms.
Update options: entry_id + config — drives the entry's options flow (what the "Configure" button does in the HA UI).
WHEN NOT TO USE:
Helpers (template, group, utility_meter, ...): use ha_config_set_helper.
Config subentries: use ha_config_set_helper(helper_type='config_subentry').
Removing an entry: use ha_remove_helpers_integrations.
Use ha_get_integration() to find entry IDs, and ha_get_integration(entry_id=..., include_schema=True) to inspect the options fields before an update.
Caveats: adding an integration runs its config flow exactly as the HA UI would (may pair devices, scan the network, create entities). Flows requiring a browser step (OAuth) or an asynchronous provider step error out at that step with a structured error instead of completing.
EXAMPLES:
Disable: ha_set_integration(entry_id="abc123", enabled=False)
Add: ha_set_integration(domain="workday", config={"name": "Workday"})
Update options: ha_set_integration(entry_id="abc123", config={"scan_interval": 30})
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| config | No | Flow form data. With 'domain': input for the new integration's config flow. With 'entry_id' alone: input for the entry's options flow (updates its options). Multi-step flows consume keys per step; menu steps take 'next_step_id'. The step's data_schema is returned on validation errors so field names can be corrected. | |
| domain | No | Integration domain to add (e.g. 'workday', 'local_calendar') — starts and drives that domain's config flow. Pass the flow's form fields in 'config'. | |
| enabled | No | True to enable, False to disable the entry. Requires entry_id; mutually exclusive with 'domain' and 'config'. | |
| entry_id | No | Config entry ID of an existing integration (enable/disable and options-update modes). Omit when adding via 'domain'. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||