From 344d66040e4c05863f7c2dff9839663cd9552f65 Mon Sep 17 00:00:00 2001 From: Trefor Southwell <48591903+springfall2008@users.noreply.github.com> Date: Sat, 27 Jan 2024 11:43:23 +0000 Subject: [PATCH 1/2] Reduce low power margin to 10 minutes https://github.com/springfall2008/batpred/issues/650 --- apps/predbat/predbat.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/predbat/predbat.py b/apps/predbat/predbat.py index 4bc392868..a5ac61cfa 100644 --- a/apps/predbat/predbat.py +++ b/apps/predbat/predbat.py @@ -18,7 +18,7 @@ import os import yaml -THIS_VERSION = "v7.15.2" +THIS_VERSION = "v7.15.3" TIME_FORMAT = "%Y-%m-%dT%H:%M:%S%z" TIME_FORMAT_SECONDS = "%Y-%m-%dT%H:%M:%S.%f%z" TIME_FORMAT_OCTOPUS = "%Y-%m-%d %H:%M:%S%z" @@ -8533,7 +8533,7 @@ def find_charge_rate(self, minutes_now, soc, window, target_soc, max_rate): """ Find the lowest charge rate that fits the charge slow """ - margin = 20 + margin = 10 if self.set_charge_low_power: minutes_left = window["end"] - minutes_now - margin @@ -11000,4 +11000,4 @@ def run_time_loop_balance(self, cb_args): except Exception as e: self.log("ERROR: Exception raised {}".format(e)) self.record_status("ERROR: Exception raised {}".format(e)) - raise + raise \ No newline at end of file From 5e7a669d23d2f9ddda1d1d3642c6742d321f245f 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, 27 Jan 2024 11:44:47 +0000 Subject: [PATCH 2/2] [pre-commit.ci lite] apply automatic fixes --- apps/predbat/predbat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/predbat/predbat.py b/apps/predbat/predbat.py index a5ac61cfa..b06dca5a3 100644 --- a/apps/predbat/predbat.py +++ b/apps/predbat/predbat.py @@ -11000,4 +11000,4 @@ def run_time_loop_balance(self, cb_args): except Exception as e: self.log("ERROR: Exception raised {}".format(e)) self.record_status("ERROR: Exception raised {}".format(e)) - raise \ No newline at end of file + raise