You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit fc0ed1c
Browse filesBrowse the repository at this point in the historyBrowse files
Resolve the run_gateway_tests conflict with #5496 and #5532 by registering
TestGatewayChargeWindow, TestGatewayDischargeWindow and TestGatewayDisplayOnly.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: apps/predbat/execute.py
+37-23Lines changed: 37 additions & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -609,7 +609,11 @@ def execute_plan(self):
609
609
else:
610
610
# If there is a previous set charge window, but its more than the set window minutes in the future but we are not close to it then we can leave it enabled for now
611
611
# saves register writes and avoids turning off the window before the inverter knows it finished
612
-
if (inverter.charge_start_time_minutes!=inverter.charge_end_time_minutes) and (inverter.charge_start_time_minutes-self.minutes_now) >self.set_window_minutes:
612
+
# Only for an inverter with no charge enable switch, where turning the charge off means rewriting the
613
+
# window itself (#2993). With a switch it is one write that leaves the times alone, and leaving it on
614
+
# arms every other slot the inverter has: on a GivEnergy 3-phase the unused slots, held at 00:00-00:00,
615
+
# are live for the first minute of the day and charged from the grid at full rate (#5371)
616
+
if (notinverter.inv_has_charge_enable_time) and (inverter.charge_start_time_minutes!=inverter.charge_end_time_minutes) and (inverter.charge_start_time_minutes-self.minutes_now) >self.set_window_minutes:
613
617
self.log(
614
618
"Inverter {} leaving charge window as already set and more than set_window_minutes {} away (now {} charge start time {})".format(
self.log("Inverter {} is charging, so the hold for car {} leaves the discharge rate and reserve alone until charging stops".format(inverter.id, car_n))
798
809
else:
799
-
ifdischarge_rateisNone:
800
-
discharge_rate=0
801
-
# Not while actually charging: the battery is being filled from the grid, so it
802
-
# cannot be feeding the car, and pinning reserve just above a rising SoC costs a
803
-
# write for every 1% of the climb (#3899). Left to reset below for the duration,
804
-
# and latched at the SoC reached once charging stops - which is the point the
805
-
# inverter returns to demand and the hold starts to mean something. The sibling
806
-
# iBoost hold below already sits out a charge for the same reason.
0 commit comments