create_or_update_automation
Create or update Home Assistant automations by defining triggers, actions, optional conditions, and mode; saves to automations.yaml and reloads.
Instructions
Create or update an automation (written to automations.yaml + reloaded).
Args: id: Stable slug (no 'automation.' prefix), e.g. 'living_room_lights_on'. name: Friendly name shown in the UI. trigger: List of HA trigger dicts. action: List of HA action dicts. condition: Optional list of HA condition dicts. description: Free-form description. mode: HA mode — 'single', 'restart', 'queued', or 'parallel'.
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": {
"id": "<id>",
"name": "<name>",
"trigger": "<trigger>",
"action": "<action>"
},
"name": "create_or_update_automation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| mode | No | single | |
| name | Yes | ||
| action | Yes | ||
| trigger | Yes | ||
| condition | No | ||
| description | No |