From 80bfc5721e2a74d49b50464da64558fdcf09e973 Mon Sep 17 00:00:00 2001 From: SAFETY-97 dev Date: Sun, 4 Oct 2026 12:51:52 +0200 Subject: [PATCH] SAFETY-97: point test_safety97 at MUTATION.md; record the DC-entity option test_bytecode requires every suite to name MUTATION.md (CI run 1158). DECISIONS: why the integration's DC battery power entity is not the fix. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_019DBUfvndgHwaV339Fvd2gr --- .../DECISIONS/SAFETY-97-idle-offset.md | 19 +++++++++++++++++++ goodwe_controller/test_safety97.py | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/goodwe_controller/DECISIONS/SAFETY-97-idle-offset.md b/goodwe_controller/DECISIONS/SAFETY-97-idle-offset.md index 2502beb..491e97f 100644 --- a/goodwe_controller/DECISIONS/SAFETY-97-idle-offset.md +++ b/goodwe_controller/DECISIONS/SAFETY-97-idle-offset.md @@ -34,6 +34,25 @@ B sat on the band's edge and never latched: start is never quiet, so never learned, so never caught. - **Until learned the idle reading is 0 W**: the rule as it was. +## Not chosen: the GoodWe LAN integration's DC battery power + +Both inverters also appear through HA's GoodWe integration (B: +`sensor.kelder_dyness_battery_power`, 0 W at idle; found read-only on the +live HA 2026-10-04). Pointing `batt_entity` at it removes B's offset by +configuration, but: + +- the band must be safe without it: other installs may not have it; +- it is polled over UDP on the inverter's Wi-Fi, a second channel that can + drop while the board keeps reading (HW-01 lost both once); a missing + reading stops the site; +- SAFETY-37's 35 s bound is derived from the board's 10 s publish; the + integration's poll interval (believed 10 s, not checked here) and latency + are not measured; +- DC power is not 0x0518, which SAFETY-30/31/42 were measured against. + +It stays an install choice to test on the rig, not a code change here. With +it, the learned idle reading is simply ~0 W. + ## Where it applies Every test of "gives nothing / gives / takes" now uses `reading - idle`: diff --git a/goodwe_controller/test_safety97.py b/goodwe_controller/test_safety97.py index 630a459..62a6f81 100644 --- a/goodwe_controller/test_safety97.py +++ b/goodwe_controller/test_safety97.py @@ -16,7 +16,7 @@ DECISIONS/SAFETY-97-idle-offset.md. 3. Learning: not while refusing or asked, bounded, restored, follows drift. 4. The rules at their edges. -Mutations (purged copies) are listed in the pull request. +Mutations (MUTATION.md, purged copies) are listed in the pull request. """ import logging