Skip to content

Commit

Permalink
Issue with reserve max causing flip/flop charging at 100% (#668)
Browse files Browse the repository at this point in the history
* Issue with reserve max causing flip/flop charging at 100%

#667


---------

Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
  • Loading branch information
springfall2008 and pre-commit-ci-lite[bot] authored Jan 30, 2024
1 parent c7d0172 commit a509745
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion apps/predbat/predbat.py
Original file line number Diff line number Diff line change
Expand Up @@ -9216,7 +9216,13 @@ def execute_plan(self):
status = "Freeze charging"
status_extra = " target {}%".format(inverter.soc_percent)
else:
if self.set_soc_enable and self.set_reserve_enable and self.set_reserve_hold and ((inverter.soc_percent + 1) >= self.charge_limit_percent_best[0]):
if (
self.set_soc_enable
and self.set_reserve_enable
and self.set_reserve_hold
and ((inverter.soc_percent + 1) >= self.charge_limit_percent_best[0])
and (inverter.reserve_max >= inverter.soc_percent)
):
status = "Hold charging"
inverter.disable_charge_window()
disabled_charge_window = True
Expand Down

0 comments on commit a509745

Please sign in to comment.