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'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| mode | No | single | |
| name | Yes | ||
| action | Yes | ||
| trigger | Yes | ||
| condition | No | ||
| description | No |