Read-only import of the pre-migration homeassistant5 container (piha), per DESIGN.md phase-0 scope: 60 automations (split one-file-per-id), 5 scenes, 1 script, plus curated .storage/* export (area/entity registries, input_boolean/input_text, lovelace dashboards). No token at ~/.config/ha-deploy/ken-legacy.token — fixtures step fail-softed as designed, no repo import.sh changes needed. Verified: gitignore-excluded paths (secrets.yaml, *.db*, logs, .storage/auth*, core.restore_state, tts/, deps/, backups/, .cloud/) correctly stripped from the pull; three consecutive import.sh runs produced byte-identical output under config/ken-legacy/ and storage-export/ken-legacy/ (idempotent); automation count matches the 2026-07-22 recon estimate (~60) exactly. README.md only touched to note the import date. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| config | ||
| fixtures | ||
| storage-export | ||
| .gitignore | ||
| DESIGN.md | ||
| instances.yaml | ||
| README.md | ||
home-assistant (configs-as-code)
Status: skeleton. Structure and read-only import tooling only — no
deploy path exists yet. See DESIGN.md for the full phasing, adapter, sync,
and validation model, and for the open questions still blocking phase 2/3.
Layout
services/home-assistant/
├── DESIGN.md # decision registry — read this first
├── instances.yaml # per-instance adapter/host/token config
├── .gitignore # excludes secrets/db/log/token paths from every import
├── config/<instance>/ # canonical, normalized /config mirror per instance
├── storage-export/<instance>/ # curated .storage/* export (registries, dashboards)
└── fixtures/ # dated /api/states snapshots
Instances: ken (RPi4/HAOS, LAN 192.168.31.7, api adapter — canonical home
instance since the 2026-07-22 cutover), ken-legacy (PIHA, container
homeassistant5, docker-exec adapter, archived — pre-migration instance,
import only, never deploy), chelsty-ha (Tailscale, api adapter — see
instances.yaml and DESIGN.md "Incident log").
Import
scripts/ha/import.sh ken
Read-only: pulls /config from the instance, filters it through
.gitignore, normalizes and splits it into config/ken/, exports curated
.storage/* into storage-export/ken/, and (if a deploy token exists at
~/.config/ha-deploy/ken.token) writes a dated /api/states fixture.
Idempotent — re-running against an unchanged instance produces no diff.
Only the docker-exec adapter is implemented; running import.sh chelsty-ha today exits with a clear "not implemented" error (its api
adapter is out of scope for this skeleton).
Tests
scripts/ha/tests/test_split_normalize.sh
Offline determinism check for the split+normalize pipeline — no network, no HA instance required.