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 53d4c65
Browse filesBrowse the repository at this point in the historyBrowse files
Merge remote-tracking branch 'origin/main' into fix/smart-control-off-planned-slots-5339
Conflicts:
- apps/predbat/fetch.py (fetch_sensor_data_cars): main (#5520/#5533) now
collects the planned dispatches a car uses into planned_used, inserts the
held half hours from octopus_held_dispatches() ahead of them and records
them in octopus_slots_planned for octopus_held_update(). This branch
filtered the planned dispatches through smart_control_off_slots() while
Smart Control is off. Combined: the filtered list (planned_kept) is what
the plugged-in check gates, so the held dispatches, octopus_slots and
octopus_slots_planned all see only the dispatches Predbat still uses. A
re-tagged charger-schedule slot is not billed off-peak, so it is never
held; a half hour already held from before Smart Control went off stays
held until the completed list has it, as Octopus billed it off-peak.
- apps/predbat/octopus.py (imports): keep both OCTOPUS_MANUAL_DISPATCH_SOURCES
(this branch) and OCTOPUS_DISPATCH_HOLD_MINUTES (main).
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