diff --git a/hosts/hass.windy.lan.md b/hosts/hass.windy.lan.md index 6b25509..de7b4b2 100644 --- a/hosts/hass.windy.lan.md +++ b/hosts/hass.windy.lan.md @@ -322,9 +322,12 @@ deployed 2026-08-18 from `216cc99` (backup ### Scribe long-term history (verified 2026-08-29) - **Scribe 3.8.0** (`/homeassistant/custom_components/scribe/`), configured from - `configuration.yaml` (`scribe:` block; config entry + `/homeassistant/scribe.yaml` — W1N-238 moved the block out of + `configuration.yaml` on 2026-08-29 (main config now carries + `scribe: !include scribe.yaml`; content moved verbatim; backup + `configuration.yaml.bak-20260829-201724-w1n238`). Config entry `01KC2VFJWEQ3XDHY6TQKHPDVRB`, `source: import` — UI "Configure → Advanced" - edits are overridden by the YAML on restart; treat YAML as authoritative). + edits are overridden by the YAML on restart; treat YAML as authoritative. - TimescaleDB at `192.168.55.15:5432/scribe` (DB user `hass`; host in inventory, see [hosts/pgdb.md](../hosts/pgdb.md)). Database re-initialized 2026-08-29 14:06 CST (user-handled; earlier `relation "entities" does not exist` errors resolved). @@ -351,6 +354,28 @@ deployed 2026-08-18 from `216cc99` (backup - Recorder stays external-Postgres with `purge_keep_days: 30` for daily UI history; Scribe is the permanent archive. +### Config layout: scribe.yaml + templates/ merge (W1N-238, verified 2026-08-29) + +- `configuration.yaml` line 29: `scribe: !include scribe.yaml`; line 9: + `template: !include_dir_merge_list templates`. No `packages/`. +- `scribe.yaml` (config root): the Scribe block, content identical to the + former inline one; import semantics unchanged. +- `templates/`: `csg_sensors.yaml` (12 template sensors, top-level **list**) + + `quick_sensors.yaml` (scaffold for Quick-derived `quick_*` sensors, empty + list with convention header). **`!include_dir_merge_list` merges per-file + lists; non-list files are silently skipped** — every file in `templates/` + must be a top-level list (`- sensor:` blocks). Directory include only picks + up `*.yaml`, so the `.bak` / `.pre-*` backups in the dir are ignored. After + adding sensors, verify template-platform entity count = 12 + N (entity + registry `platform: template`). +- Convention (per review + W1N-233): pure sums/averages stay min_max helpers + (e.g. `sensor.dang_qian_zong_gong_lu`); only template-logic derivations + (ladder pricing, cross-entity conditions) go into `quick_sensors.yaml`. +- Post-change verification 20:19 CST: `ha core check` ok, 92 s restart + (2026.8.3), `binary_sensor.scribe_database_connection` on, + `scribe_states_written` 18581→19426 growing, template entities still 12, + csg sensors numeric, no scribe/template log errors. + ### Timescale Plotly card + database reader (verified 2026-08-29) Chart stack over the Scribe TimescaleDB archive. Upstream pair (no HACS;