Skip to content

Commit

Permalink
Fix crash with hold charge (#1813)
Browse files Browse the repository at this point in the history
  • Loading branch information
springfall2008 authored Dec 28, 2024
1 parent de66c1c commit 98caca0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions apps/predbat/execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,7 @@ def fetch_inverter_data(self, create=True):
# Remove extra decimals
self.soc_max = dp3(self.soc_max)
self.soc_kw = dp3(self.soc_kw)
self.soc_percent = calc_percent_limit(self.soc_kw, self.soc_max)
self.reserve = dp3(self.reserve)
self.reserve_percent = calc_percent_limit(self.reserve, self.soc_max)
self.reserve_current = dp3(self.reserve_current)
Expand Down
1 change: 1 addition & 0 deletions apps/predbat/predbat.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ def reset(self):
self.forecast_days = 0
self.forecast_minutes = 0
self.soc_kw = 0
self.soc_percent = 0
self.soc_max = 10.0
self.end_record = 24 * 60 * 2
self.predict_soc = {}
Expand Down

0 comments on commit 98caca0

Please sign in to comment.