Release 0.4.0
Tests / tests (requirements-test-latest.txt) (push) Successful in 1m45s
Tests / tests (requirements-test.txt) (push) Successful in 1m42s

Zones, electrical heat sources, windows with ventilation, wind exposure
and recovery, and exchange between adjacent zones, all observational.
docs/MODEL.md documents the equations, units, coefficient meanings,
priors and bounds, learning conditions, forecast assumptions, validation
method and results, and limitations. README gains a configuration guide
for zones, heat sources and windows, the new diagnostics and the
accuracy comparison against the base model. CHANGELOG has upgrade notes
(config entry version 3, rollback needs the backup, renamed Status
attributes). ROADMAP marks the Milestone 2 items now covered; AUDIT
records the design decisions and evidence. AGENTS.md lists the new
modules and the convention that new model terms start at zero and must
beat the base model out of sample before being relied on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
buzeraandClaude Opus 5.5 committed 2026-10-27 03:02:21 +02:00
1 parent dc92e2bac5
commit 17dbe76223
7 files changed
+491 -66

No files matched your search

+51
View File
@@ -269,3 +269,54 @@ poll with missing shared inputs now reports `waiting_for_inputs` instead of noth
**Verification.** `sh scripts/check.sh` passes in both environments: lint, 80
offline tests, 20 HA Core tests, compilation, package checks. The offline tests
also pass on Python 3.9.6.
## 0.4.0 — zones, electrical heat, ventilation, wind, inter-zone exchange
Scope: repository code and tests (HA Core 2025.12.0 and 2026.2.3 harness); no
HAOS, device or deployment testing. Still no actuator code; the static and runtime
service-call guards pass.
Design decisions and why:
- **Zones as config subentries.** HA's native pattern for several items under one
integration gives per-item add/edit/delete and removes a zone's entities with it.
Config entry version 3; migrating from 2 keeps each room's sensor ID as the zone
key so learned models, entities and statistics carry over. Rollback needs the
backup.
- **Layered model per zone.** The 0.3 base model is kept unchanged as fallback and
as the comparison every forecast is scored against; the extended and ventilation
layers learn only from intervals where their inputs are known, start at 0 with
priors sized in "typical samples", and report confidence. This follows the
roadmap rule to retain the simpler model and justify complexity by measured
improvement.
- **Ventilation separated from envelope loss.** Open, unknown or recovering windows
exclude a zone from base and extended learning; a separate learner fits the
residual. On the synthetic week, not doing this produced a −0.013 °C/5 min bias
and an 11 % inflated boiler coefficient.
- **Baseline-centred electrical heat.** The persistent load is already in the bias
term; only variation above a 24-hour 20th percentile is modeled, after a
first-order response driven by the power held over each interval.
- **Bounded directional wind term.** |vent_wind_dir| ≤ vent_wind, so leeward
windows still ventilate; angles use wrap-around differences.
- **Forecast assumptions** are single, conservative scenarios (electrical heat
fades with a half-life, open windows close after a set time) and are
configurable; no uncertainty band yet.
- **Exact compiled step** for the plan search: all terms are affine in temperatures
and lag, so coefficients are read off the real model (verified to 1e-12); the
180-minute search is 4.5× faster.
Evidence (synthetic apartments, 60-minute error, full vs base vs no change): gaming
office 0.031 / 0.182 / 0.40 °C; ventilation bedroom 0.026 / 0.218 / 0.52 °C; two
coupled rooms 0.024 / 0.037 / 0.29 °C. Coefficients recovered: electrical, boiler
and loss within 10 %; combined natural+wind ventilation within 15 %; recovery within
15 %; wind direction within 30 %. Coupling is found but correctly reported as not
identified when the rooms' difference is steady.
Not done, by decision: learned response time constants (configurable; compare
candidates out of sample next), a wall-mass state, forecast scenarios/uncertainty,
weather forecasts. Learners of removed zones keep only the base model.
**Verification.** `sh scripts/check.sh` passes in both environments (lint, 125
offline tests, 26 HA Core tests, compilation, package/translation/changelog checks).
The offline tests also pass on Python 3.9.6.