instances.yaml pointed "ken" at the piha container (homeassistant5), a pre-migration instance that never actually stopped running — it kept firing automations in parallel with the real home instance (HAOS on a dedicated RPi4, 192.168.31.7), causing duplicate triggers on shared buttons/scenes. Repoint ken to the real instance (api adapter), demote the container to ken-legacy (archived, import-only, never a deploy target), and log the incident in DESIGN.md.
1.8 KiB
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.