Create or update automation
ha_set_automationCreate or update a Home Assistant automation by unique ID, supplying its alias, triggers, conditions, actions, and mode; saving reloads automations automatically.
Instructions
Create or update an automation by unique id. 'config' is the automation body (alias, trigger, condition, action, mode). Home Assistant reloads automations automatically after saving. Requires HA_ALLOW_WRITE=true and HA_ALLOW_CONFIG_WRITE=true.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"automation_id": "<automation_id>",
"config": "<config>"
},
"name": "ha_set_automation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| config | Yes | Automation config object: { alias, trigger, condition, action, mode, ... }. | |
| instance_id | No | Optional: the instance you mean (as listed by vomehome_list_instances). When given, the call is refused if this session is targeting a different home, instead of answering from it. | |
| automation_id | Yes | Unique id of the automation (existing id to update, or a new id to create). |