diff --git a/kubernetes/apps/home-assistant/config-sync.sh b/kubernetes/apps/home-assistant/config-sync.sh index 0cfdf07a..b2c5f05d 100644 --- a/kubernetes/apps/home-assistant/config-sync.sh +++ b/kubernetes/apps/home-assistant/config-sync.sh @@ -11,10 +11,12 @@ # pull — when `main` advances (a merged PR, or a push from elsewhere) the new # commits are merged back into `live`/the working tree and HA reloads. # -# Scope: only the paths in PATHS. It never touches the rest of www/ (HACS rewrites -# those at runtime) or untracked runtime state (.storage/, *.db, secrets.yaml, -# tts/, deps/, ...). git auth uses the PAT embedded in the PVC's remote URL (also -# reused for the gitea API to open the PR); reload auth uses $HA_TOKEN. +# Scope: the paths in PATHS, which now include all of www/. HACS rewrites www/ +# files at runtime; two-way merge handles that fine — the drift is committed to +# `live` (PR'd) and merges cleanly, so it no longer needs excluding. Untracked +# runtime state (.storage/, *.db, secrets.yaml, tts/, deps/, ...) is still left +# alone (it isn't tracked). git auth uses the PAT embedded in the PVC's remote +# URL (also reused for the gitea API to open the PR); reload auth uses $HA_TOKEN. # # Conflicts are left to git: a merge that conflicts is ABORTED (never written # into the live files, which would break HA) and logged for you to resolve in the @@ -29,10 +31,10 @@ LIVE="${SYNC_LIVE_BRANCH:-live}" INTERVAL="${SYNC_INTERVAL:-30}" HA_URL="${HA_URL:-http://127.0.0.1:8123}" -# Tracked HA config paths synced in both directions. www/heizungsanlage-card.js is -# a bespoke, non-HACS custom card synced by exact path; the rest of www/ stays -# HACS-managed and untouched. -PATHS="automations.yaml automations packages scripts.yaml templates.yaml configuration.yaml notify.yaml groups.yaml powercalc.yaml blueprints www/heizungsanlage-card.js" +# Tracked HA config paths synced in both directions. www/ is included in full +# (bespoke cards AND HACS-managed assets) — HACS runtime rewrites are captured to +# `live` and merged correctly rather than excluded. +PATHS="automations.yaml automations packages scripts.yaml templates.yaml configuration.yaml notify.yaml groups.yaml powercalc.yaml blueprints www" # Log to stderr: busybox sh block-buffers stdout when it is a pipe (as under # kubelet), so stdout lines can sit unflushed for the life of the loop. stderr is