From 6cf50f14a358fcc77cf9b655b113df77b95f9221 Mon Sep 17 00:00:00 2001 From: Konstantin Renner Date: Tue, 30 Jun 2026 00:13:50 +0200 Subject: [PATCH] feat(home-assistant): include all of www/ in config-sync (two-way merges it) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit www/ was excluded (except the bespoke heizungsanlage card) because the old one-way force-overwrite fought HACS's runtime rewrites. With two-way sync that no longer applies: HACS drift is committed to `live`, PR'd, and merges cleanly. Widen PATHS from www/heizungsanlage-card.js to the whole www/ directory. Bonus: this also removes the merge-refusal edge case — www changes are now committed before the merge step, so there's no uncommitted www drift left to block a merge. First run captures the current HACS drift (~6 frontend files: kiosk-mode, xiaomi-vacuum-map-card) as one small live PR, then stays current. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01GgbyKgrN1yYWrkAA32rJE5 --- kubernetes/apps/home-assistant/config-sync.sh | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) 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 -- 2.54.0