From 43bb426c2910da85121aeb8e5cbdf81624ed484a Mon Sep 17 00:00:00 2001 From: salewis38 <46199139+salewis38@users.noreply.github.com> Date: Sun, 24 Sep 2023 14:23:03 +0100 Subject: [PATCH] Improved parsing of low_soc Forced low_soc to be imported from palm_settings as an integer in case of user error in settings file. --- palm_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/palm_utils.py b/palm_utils.py index b241654..b442307 100644 --- a/palm_utils.py +++ b/palm_utils.py @@ -469,9 +469,9 @@ def compute_tgt_soc(self, gen_fcast, weight: int, commit: bool) -> str: # low_soc is the minimum SoC target. Provide more buffer capacity in shoulder months # when load is likely to be more variable, e.g. heating if stgs.pg.month in stgs.GE.shoulder: - low_soc = stgs.GE.max_soc_target + low_soc = int(stgs.GE.max_soc_target) else: - low_soc = stgs.GE.min_soc_target + low_soc = int(stgs.GE.min_soc_target) max_charge_pc = max_charge_pcnt[0] min_charge_pc = min_charge_pcnt[0]