SAFETY-136: a gentler loop on a slow meter until the last move shows
checks / unit (pull_request) Successful in 26m18s
infra-pin / fresh (pull_request) Successful in 2s

On a meter whose readings come 4 s or more apart, the loop runs at half its
gain after a move of 150 W or more, until the meter has fallen by half of the
move or 2 cycles have passed. With readings 10 s late on a 5 s meter the export
falls 44 % over oven, kettle and hob, owner shape, steps; 1-2 s meters are
untouched.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
goodwe-agent
2026-11-09 14:49:26 +01:00
parent 8508ac33f0
commit c50e2279dd
8 changed files with 398 additions and 8 deletions
+1
View File
@@ -197,6 +197,7 @@ class InputsMixin:
# correlates 0.998 with battery power and 0.09 with the real meter
# (a controller would regulate against its own output).
self.grid = self.p1.net_w
self.settle.arrive(now_mono, self.p1.samples) # SAFETY-136
else:
self.grid = await self.hass.number(o.get("meter_entity", ""),
bool(o.get("meter_invert")))