MAINT-28: keep the single shaping_suspended(.., maint_aim) call site (test_peak_margin pin); shaping_held takes its answer
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude
parent
23359a047d
commit
edf30f345a
@@ -572,11 +572,12 @@ class CycleMixin:
|
||||
# (SAFETY-87 / SAFETY-119 pins).
|
||||
house = (None if self.grid is None or self.site_batt_w is None
|
||||
else float(self.grid) + float(self.site_batt_w))
|
||||
_susp = peakguard.shaping_suspended(
|
||||
self.peak_guard, self.peak_fc, maint_aim)
|
||||
self._maint_peak_hold = peakguard.shaping_held(
|
||||
_peak_held and len(self.inverters) > 1
|
||||
_susp, _peak_held and len(self.inverters) > 1
|
||||
and maint_aim > self.peak_aim_w(),
|
||||
self.peak_guard, self.peak_fc,
|
||||
maint_aim, house)
|
||||
self.peak_fc, maint_aim, house)
|
||||
if self._maint_peak_hold:
|
||||
# Edge-logged: level-logging here would write one line per
|
||||
# cycle for as long as the event lasts and flush the 40-line
|
||||
|
||||
Reference in New Issue
Block a user