ha-automations
/ha-automations
Pisze, poprawia i sprawdza automatyzacje, skrypty i blueprinty Home Assistant w składni danej wersji: wyzwalacze, warunki, akcje i trace.
- Autor
- mleibetseder ↗
- Repozytorium
- home-assistant-agent-plugin ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 26.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 2
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 26.10.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Pisze, poprawia i sprawdza automatyzacje, skrypty i blueprinty Home Assistant w składni danej wersji: wyzwalacze, warunki, akcje i trace.
Wyzwalacze z opisu
Oryginalny opis (EN)
Writes, fixes and reviews Home Assistant automations, scripts and blueprints in the syntax of the user''s version: triggers, conditions, actions, modes, waits, error handling and trace debugging. Use for "write an automation", "my automation does not fire", "blueprint", "HA script".
Jak działa
- Syntax by version
- Rules
- Scripts and blueprints
- Debug
- Example (2024.10+ syntax)
Podgląd SKILL.md
---
name: ha-automations
version: 1.0.0
description: 'Writes, fixes and reviews Home Assistant automations, scripts and blueprints in the syntax of the user''s version: triggers, conditions, actions, modes, waits, error handling and trace debugging. Use for "write an automation", "my automation does not fire", "blueprint", "HA script".'
metadata:
category: home-automation
---
# HA Automations
Automations react (triggers → conditions → actions); scripts are reusable action sequences with fields; blueprints are automations or scripts with inputs. Check the version first (`skills/ha-live-instance`) and use real entity IDs.
## Syntax by version
| Since | Use | Instead of |
|---|---|---|
| 2024.8 | `action: light.turn_on` | `service:` (still works) |
| 2024.10 | `triggers:`, `conditions:`, `actions:` and `- trigger: state` | `trigger:`/`condition:`/`action:` lists and `platform: state` (still work) |
| 2026.7 | Purpose-specific triggers and conditions, for example `- trigger: motion.detected` with `target: {area_id: hallway}` and `options: {for: …, behavior: each\|first\|all}` | Device triggers and state triggers on sensors, where a purpose-specific one exists |
2026.7 also renamed some purpose-specific keys (for example `battery.low` → `battery.became_low`, `vacuum.docked` → `vacuum.returned_to_dock`); check the release notes of the user's version for renamed keys before reusing older YAML. Older versions: write the classic `trigger: state` / `numeric_state` form.
## Rules
1. **Entities, not devices.** Target `entity_id`, `area_id`, `floor_id` or `label_id`; `device_id` and device triggers break when a device is re-added.
2. **Pick the mode on purpose:** `single` (default; a second run is dropped with a warning), `restart` for motion lights and timers that must start over, `queued` for steps that must all run in order, `parallel` for independent runs. Set `max_exceeded: silent` only when dropping is expected.
3. **Native before template:** `state`, `numeric_state`, `time`, `sun`, `zone` and purpose-specific triggers and conditions before `template` ones; helpers (timer, schedule, threshold, min_max) before long templates (`skills/ha-templates`).
4. **Survive restarts and `unavailable`:** `for:` timers do not survive a restart; long delays belong in a `timer` helper. Guard `numeric_state` and state triggers against `unavailable`/`unknown` (`not_from:`/`not_to:`). Give every `wait_for_trigger` and `wait_template` a `timeout` and handle `wait.completed`.
5. **No loops:** an automation that changes the entity it triggers on needs a condition or `trigger.to_state.context` check.
6. **Errors:** a missing target is skipped with a warning, not an error; `continue_on_error: true` covers runtime errors of that step only, not configuration or template errors; `enabled: false` turns one step off.
7. **One automation, one purpose,** with an `alias`, a `description` and `id` (UI-editable); trigger `id:` for branching with `choose:` (the UI shows this as the "Triggered by" condition since 2026.10).
## Scripts and blueprints
- Script `fields:` document inputs; `required` and `default` only shape the UI, so templates still need `| default(…)`. `script.turn_on` does not wait; call the script directly (`action: script.<name>`) to wait for it, and pass values under `data:`.
- `response_variable:` only on actions that return data (it makes other actions fail); read it in the next steps.
- Blueprints: `blueprint:` with `name`, `domain` (`automation`, `script` or `template`), `homeassistant: min_version:` and typed `input:` selectors; `!input` is a YAML tag, so use it through `variables:` inside templates.
## Debug
1. Open the automation's **Traces**: which trigger fired, which condition stopped it, what each action returned.
2. Not in the trace at all: trigger never fired; check the state history of the trigger entity and the mode (`single` dropped it).
3. Test a trigger, condition or action snippet with `validate_config` or in Tools → YAML before saving.
## Example (2024.10+ syntax)
```yaml
- id: hallway_motion_light
alias: Hallway light on motion
description: On with motion after sunset, off 2 minutes after motion stops.
mode: restart
triggers:
- trigger: state
entity_id: binary_sensor.hallway_motion
to: "on"
conditions:
- condition: sun
after: sunset
actions:
- action: light.turn_on
target:
entity_id: light.hallway
- wait_for_trigger:
- trigger: state
entity_id: binary_sensor.hallway_motion
to: "off"
for: "00:02:00"
timeout: "01:00:00"
- action: light.turn_off
target:
entity_id: light.hallway
```
Pliki w paczce (2)
- SKILL.md 5 KB
- agents/openai.yaml 1 KB
Wersje
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · mleibetseder/home-assistant-agent-plugin | 100 | MIT |
| laurigates/claude-plugins | 100 | MIT |
Migawka bazy z 13.11.2026 · wersja paczki 02fafe5c7932 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 1 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100ha-yaml-automations
Opisuje automatyzacje YAML w Home Assistant: wyzwalacze, warunki i akcje, pisanie i naprawę automatyzacji oraz strukturę logiki. - 100homeassistant-config
Pisze, poprawia i modernizuje pliki YAML Home Assistant: automatyzacje, skrypty, sceny, encje szablonowe, blueprinty i dashboardy. - 100ha-device-conditions-actions
Implementuje warunki i akcje urządzeń dla automatyzacji Home Assistant w device_condition.py i device_action.py. - 90write
Tworzy, zmienia i usuwa automatyzacje oraz skrypty Home Assistant, a także zapisuje i uruchamia blueprinty przez HA NOVA Relay. - 100home-assistant
Pomaga w konfiguracji Home Assistant: tworzy automatyzacje, zmienia dashboardy, sprawdza stany encji, debuguje automatyzacje i generuje YAML dla inteligentnego domu. - 100ha-automation-explorer
Przegląda i wyjaśnia automatyzacje Home Assistant: listuje według tematu, filtruje po słowach kluczowych z wyjaśnieniem YAML prostym językiem lub sortuje według ostatniego uruchomienia, tylko do odczytu.