Skip to content

Commit

Permalink
Leave pause mode enable when car charges (#1246)
Browse files Browse the repository at this point in the history
  • Loading branch information
springfall2008 authored Jun 23, 2024
1 parent 3e1dfd1 commit 101a103
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apps/predbat/predbat.py
Original file line number Diff line number Diff line change
Expand Up @@ -8665,6 +8665,7 @@ def execute_plan(self):
inverter.adjust_charge_rate(inverter.battery_rate_max_charge * MINUTE_WATT)

# Car charging from battery disable?
carHolding = False
if not self.car_charging_from_battery:
for car_n in range(self.num_cars):
if self.car_charging_slots[car_n]:
Expand All @@ -8679,6 +8680,7 @@ def execute_plan(self):
inverter.adjust_discharge_rate(0)
inverter.adjust_pause_mode(pause_discharge=True)
resetDischarge = False
carHolding = True
self.log("Disabling battery discharge while the car {} is charging".format(car_n))
if status != "Idle":
status += ", Hold for car"
Expand All @@ -8691,7 +8693,7 @@ def execute_plan(self):
inverter.adjust_charge_immediate(0)

# Pause charge off
if not isCharging and not isDischarging:
if not isCharging and not isDischarging and not carHolding:
inverter.adjust_pause_mode()

# Reset discharge rate?
Expand Down

0 comments on commit 101a103

Please sign in to comment.