Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/predbat/predbat.py
Original file line number Diff line number Diff line change
Expand Up @@ -5024,7 +5024,7 @@ def plan_car_charging(self, car_n, low_rates):
# Clamp length to required amount (shorten the window)
if kwh_add > kwh_left:
percent = kwh_left / kwh_add
length = min(int(((length * percent) / 5) + 2.5) * 5, end - start)
length = min(int(((length * percent) / 5) + 0.5) * 5, end - start)
end = start + length
hours = length / 60
kwh = self.car_charging_rate[car_n] * hours
Expand Down