MAINT-28: the hold is for N=2 and up (SAFETY-87 N=1 pins), N=1 peak digest test
checks / unit (pull_request) Failing after 36m51s
infra-pin / fresh (pull_request) Successful in 2s

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
glenn schrooyen
2026-11-12 22:28:01 +01:00
co-authored by Claude
parent 8cd10ee6aa
commit 4f9aa5223f
3 changed files with 9 additions and 3 deletions
+3 -1
View File
@@ -565,10 +565,12 @@ class CycleMixin:
float(self.o.get("peak_cap_w", 3500)),
self.peak_margin_w, _reading)
# MAINT-28: stays paused until the house is clear of the aim.
# N=2 and up; one inverter keeps the old rule (SAFETY-87 pins).
house = (None if self.grid is None or self.site_batt_w is None
else float(self.grid) + float(self.site_batt_w))
self._maint_peak_hold = peakguard.shaping_held(
self._maint_peak_hold, self.peak_guard, self.peak_fc,
self._maint_peak_hold and len(self.inverters) > 1,
self.peak_guard, self.peak_fc,
maint_aim, house)
if self._maint_peak_hold:
# Edge-logged: level-logging here would write one line per