Idea
Currently the Automatisierungen bundle shows friendly_name / description / mode / last_triggered. NOT the actual logic. For documentation of "why does this happen" the trigger / condition / action structure is the key.
Proposed change
Per automation entry, append a fenced YAML block with the underlying configuration:
```yaml
trigger:
- platform: time
at: "sunset"
condition: []
action:
- service: light.turn_on
target:
area_id: garden
```
Same for scripts (action sequence).
Source
UI-managed automations are stored in .storage/core.entity_registry for entity records and .storage/automations / .storage/scripts for the body. YAML-defined automations are in configuration.yaml / automations.yaml and HA exposes them via hass.data['automation'] after load.
Best path: automation.async_get_blueprint_used exposed by HA + reading the storage file directly. Both async-safe.
Files
extractor.py — extend AutomationSnapshot/ScriptSnapshot with yaml_body: str | None
renderer.py — render fenced yaml block per entry
Edge cases
- Very long automations (200+ lines) — truncate or full? Suggest full; users can collapse in BookStack
- Sensitive data in YAML (API keys, tokens) — automations don't usually have them, but document the risk
Acceptance
- Each automation entry has YAML block with its config
- Determinism preserved
- Tests for both UI-defined + YAML-defined sources
Scope
Mittel-groß. v0.9.
Idea
Currently the Automatisierungen bundle shows friendly_name / description / mode / last_triggered. NOT the actual logic. For documentation of "why does this happen" the trigger / condition / action structure is the key.
Proposed change
Per automation entry, append a fenced YAML block with the underlying configuration:
```yaml
trigger:
at: "sunset"
condition: []
action:
target:
area_id: garden
```
Same for scripts (action sequence).
Source
UI-managed automations are stored in
.storage/core.entity_registryfor entity records and.storage/automations/.storage/scriptsfor the body. YAML-defined automations are inconfiguration.yaml/automations.yamland HA exposes them viahass.data['automation']after load.Best path:
automation.async_get_blueprint_usedexposed by HA + reading the storage file directly. Both async-safe.Files
extractor.py— extend AutomationSnapshot/ScriptSnapshot withyaml_body: str | Nonerenderer.py— render fencedyamlblock per entryEdge cases
Acceptance
Scope
Mittel-groß. v0.9.