From 38d0ea2d1008e0720502f873a043a7d2cbfc9c5f Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Sat, 3 Aug 2024 16:08:30 +0000 Subject: [PATCH] [pre-commit.ci lite] apply automatic fixes --- apps/predbat/predbat.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/apps/predbat/predbat.py b/apps/predbat/predbat.py index bc053a120..7c9a76496 100644 --- a/apps/predbat/predbat.py +++ b/apps/predbat/predbat.py @@ -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 @@ -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]