Create or overwrite an automation config
automations_set_automation_configCreates or replaces a Home Assistant automation config by ID, then reloads automations. Replaces the entire config, not for partial edits.
Instructions
Create or replace the automation whose config id is automation_id.
Posts config to /api/config/automation/config/<id>, replacing the
whole stored config at that id (or creating a new automation if the id
is unused), then calls the automation.reload service.
Not for: editing a single field without resending the rest of the
config — this tool always replaces the whole stored config.
Returns: dict {"status": "saved", "automation_id", "result"}.
Errors: returns {"error": "config must be a dict"} when config
isn't a dict, or {"error": "config must contain at least 'alias' or 'trigger'/'triggers'"} when both are missing.
Limits: no confirm parameter; an existing automation at
automation_id is replaced without a prompt.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| config | Yes | Full automation config replacing whatever is stored at `automation_id` (alias, triggers, conditions, actions, mode). Must contain 'alias' or 'trigger'/'triggers'. | |
| automation_id | Yes | Automation config id to create or replace — the entity's `id` attribute, not its entity_id. An id that does not exist yet creates a NEW automation instead of editing one; read the current id from `entities_get_entity(entity_id)` -> attributes.id before editing. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||