ha-workflow-automation-builder
A repeatable recipe to turn a request into a working automation. Prerequisite:
../ha-shared/SKILL.md; see also
../ha-automation/SKILL.md.
Steps
- Gather context — never guess entity ids or services.
hass-cli state list -o json | jq '[.[].entity_id]' # available entities hass-cli service describe light.turn_on # fields for actions hass-cli registry area list # for area targeting - Draft the config as YAML/JSON. Prefer plural keys
(
triggers/conditions/actions) for UI-managed ids. Minimal example:alias: Sunset lights triggers: - trigger: sun event: sunset conditions: [] actions: - action: light.turn_on target: entity_id: light.living_room mode: single - Save (choose a stable id; 32-hex for UI storage):
hass-cli workflow automation save sunset_lights --file sunset_lights.yaml - Reload so it takes effect:
hass-cli workflow automation reload - Verify — confirm it exists, then test:
hass-cli workflow automation get sunset_lights hass-cli workflow automation trigger automation.sunset_lights hass-cli system logbook --entity automation.sunset_lights
Guardrails
- Validate every
entity_idagainststate listbefore saving. - Validate every action against
service describe. - If
savereturns HTTP 404, theconfigintegration is disabled — fall back to editingautomations.yamlandautomation reload. - Keep automations small; prefer multiple focused automations over one large one.