Skip to content

Commit be0ccf0

Browse files
chalfontchubbyclaude
authored andcommitted
docs(car): say Octopus dispatches still show a moving start, and list Wallbox among the plan readers (#5120 review)
An Intelligent dispatch already underway has its start trimmed to now by the Octopus component, so the comment's claim that Octopus slots keep their own start unchanged was wrong for those. The shared plan parser also has a new caller in Wallbox since the rebase. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 4cf0338 commit be0ccf0

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

‎apps/predbat/gateway.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ def _refresh_ev_windows(self):
506506
507507
Datetimes are localized using ``self.local_tz`` so comparisons respect the component
508508
timezone and DST transitions. The plan carries no year; ``utils.parse_car_plan_windows()``
509-
(shared with myenergi and GivEnergy EVC) rebuilds it around now, so a window that straddles
509+
(shared with the other charger components) rebuilds it around now, so a window that straddles
510510
New Year is anchored correctly whichever side of midnight it is read (#269).
511511
"""
512512
planned = self.get_state_wrapper(f"binary_sensor.{self.prefix}_car_charging_slot", attribute="planned") or []

‎apps/predbat/output.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,8 @@ def publish_car_plan(self):
165165

166166
# Show when the window really began, not the planner's clamped start, so the
167167
# displayed start time stops walking forward once charging is underway (#269).
168-
# Octopus slots carry no start_orig, so they keep their own start unchanged.
168+
# Octopus slots carry no start_orig and show their own start - which the Octopus
169+
# component trims to now once a dispatch is underway, so those still move.
169170
window_start = window.get("start_orig", window["start"])
170171

171172
time_format_time = "%H:%M:%S"

‎apps/predbat/utils.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1768,7 +1768,7 @@ def parse_car_plan_windows(planned, now, local_tz):
17681768
"""Turn one car's published charging plan into a list of localised (start, end) pairs.
17691769
17701770
Shared by the components that drive a charger from the plan (myenergi, GivEnergy EVC,
1771-
Ohme, the gateway EVC) so the awkward parts stay in one place: the plan carries no year, so each window is
1771+
Ohme, Wallbox, the gateway EVC) so the awkward parts stay in one place: the plan carries no year, so each window is
17721772
rebuilt around now - without that, a plan read either side of New Year lands eleven
17731773
months out - and a malformed entry is skipped rather than costing the rest of the plan.
17741774

0 commit comments

Comments
 (0)