ha-automation
Manage automations, scripts, and scenes. Prerequisite:
../ha-shared/SKILL.md. To author a NEW automation from
a request, follow ../ha-workflow-automation-builder/SKILL.md.
Commands
hass-cli workflow automation list # entities + state (on/off, last_triggered)
hass-cli workflow automation get <id> # full config (REST config editor)
hass-cli workflow automation save <id> --file a.yaml
hass-cli workflow automation delete <id>
hass-cli workflow automation reload
hass-cli workflow automation trigger automation.<name>
script and scene share the same verbs (scene trigger maps to
scene.turn_on).
Dual storage (important)
Home Assistant has two automation storages:
- UI storage (
.storage): 32-char hex id, plural keystriggers/conditions/actions. - File storage (
automations.yaml): any id, singular keystrigger/condition/action.
When you save, match the keys to the target. save <id> to a UI-managed id
should use the plural form. If save returns HTTP 404, the config
integration (default_config) is not enabled on that instance.
Inspect failures
hass-cli workflow automation get <id>
hass-cli system logbook --entity automation.<name>
hass-cli raw ws trace/list --data '{"domain":"automation","item_id":"<id>"}'