Skip to content

Commit

Permalink
[pre-commit.ci lite] apply automatic fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci-lite[bot] authored Aug 3, 2024
1 parent 6eae202 commit 38d0ea2
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions apps/predbat/predbat.py
Original file line number Diff line number Diff line change
Expand Up @@ -4245,13 +4245,12 @@ def publish_json_plan(self, pv_forecast_minute_step, pv_forecast_minute_step10,

slot["state"] = {}

slot['state']['mode'] = soc_sym
slot["state"]["mode"] = soc_sym
if minute in self.manual_idle_times:
slot['state']['mode'] += " Idle"
slot['state']['override'] = True
slot["state"]["mode"] += " Idle"
slot["state"]["override"] = True
split = False


slot["state"]["soc"] = {}
slot["state"]["soc"]["percent"] = soc_percent
slot["state"]["soc"]["percent_end"] = soc_percent_end
Expand Down Expand Up @@ -4305,11 +4304,11 @@ def publish_json_plan(self, pv_forecast_minute_step, pv_forecast_minute_step10,
soc_change_this = self.predict_soc_best.get(max(start - self.minutes_now, 0), 0.0) - self.predict_soc_best.get(minute_relative_start, 0.0)
slot["state"]["soc"]["change"] = self.dp2(soc_change_this)
if soc_change_this >= 0:
slot['state']['mode'] = " (increasing)"
slot["state"]["mode"] = " (increasing)"
elif soc_change_this < 0:
slot['state']['mode'] = " (decreasing)"
slot["state"]["mode"] = " (decreasing)"
else:
slot['state']['mode'] = " (hold)"
slot["state"]["mode"] = " (hold)"

if discharge_window_n >= 0:
limit = self.discharge_limits_best[discharge_window_n]
Expand Down

0 comments on commit 38d0ea2

Please sign in to comment.