MAINT-28: during a real peak the maintenance charge stays paused until the house is clear of the aim
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude
parent
1b5f7c9ccb
commit
8cd10ee6aa
@@ -564,8 +564,13 @@ class CycleMixin:
|
||||
maint_aim = peakguard.quarter_target_w(
|
||||
float(self.o.get("peak_cap_w", 3500)),
|
||||
self.peak_margin_w, _reading)
|
||||
if peakguard.shaping_suspended(
|
||||
self.peak_guard, self.peak_fc, maint_aim):
|
||||
# MAINT-28: stays paused until the house is clear of the aim.
|
||||
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,
|
||||
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
|
||||
# action log of the very context that explains it.
|
||||
|
||||
Reference in New Issue
Block a user