# 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// # canonical, normalized /config mirror per instance ├── storage-export// # 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 ```bash 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 ```bash scripts/ha/tests/test_split_normalize.sh ``` Offline determinism check for the split+normalize pipeline — no network, no HA instance required.