From f2ffebc6518e46f995896ab2c418f1f428e816f2 Mon Sep 17 00:00:00 2001 From: fboundy Date: Wed, 14 Feb 2024 20:22:43 +0000 Subject: [PATCH 1/2] Check self.hold is not empty --- apps/pv_opt/pv_opt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/pv_opt/pv_opt.py b/apps/pv_opt/pv_opt.py index 5e9127c..927ac2a 100644 --- a/apps/pv_opt/pv_opt.py +++ b/apps/pv_opt/pv_opt.py @@ -1492,7 +1492,7 @@ def optimise(self): # If the current slot is a Hold SOC slot and we aren't holding then we need to # enable Hold SOC - if self.hold[0]["active"]: + if self.hold and self.hold[0]["active"]: if ( not status["hold_soc"]["active"] or status["hold_soc"]["soc"] != self.hold[0]["soc"] From 7e1107ce21909e811bb8d11ff56d7f6e174f2378 Mon Sep 17 00:00:00 2001 From: fboundy Date: Wed, 14 Feb 2024 20:23:11 +0000 Subject: [PATCH 2/2] 3.8.7 --- README.md | 2 +- apps/pv_opt/pv_opt.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 78a6913..f52b5ec 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# PV Opt: Home Assistant Solar/Battery Optimiser v3.8.6 +# PV Opt: Home Assistant Solar/Battery Optimiser v3.8.7 Solar / Battery Charging Optimisation for Home Assistant. This appDaemon application attempts to optimise charging and discharging of a home solar/battery system to minimise cost electricity cost on a daily basis using freely available solar forecast data from SolCast. This is particularly beneficial for Octopus Agile but is also benefeficial for other time-of-use tariffs such as Octopus Flux or simple Economy 7. diff --git a/apps/pv_opt/pv_opt.py b/apps/pv_opt/pv_opt.py index 927ac2a..1d9d22e 100644 --- a/apps/pv_opt/pv_opt.py +++ b/apps/pv_opt/pv_opt.py @@ -20,7 +20,7 @@ # USE_TARIFF = True -VERSION = "3.8.6" +VERSION = "3.8.7" DEBUG = False DATE_TIME_FORMAT_LONG = "%Y-%m-%d %H:%M:%S%z"