From cfec1b6af8e36841484ddece0adf1298ec29462c Mon Sep 17 00:00:00 2001 From: andig Date: Fri, 20 Mar 2026 19:51:13 +0100 Subject: [PATCH] Loadpoint: log battery boost errors (#28403) --- core/loadpoint.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/core/loadpoint.go b/core/loadpoint.go index 0347a7eb1..066c7d34e 100644 --- a/core/loadpoint.go +++ b/core/loadpoint.go @@ -1877,12 +1877,13 @@ func (lp *Loadpoint) phaseSwitchCompleted() bool { func (lp *Loadpoint) Update(sitePower, batteryBoostPower float64, consumption, feedin api.Rates, batteryBuffered, batteryStart bool, greenShare float64, effPrice, effCo2 *float64) { // auto-disable battery boost when SOC drops below limit if lp.GetBatteryBoost() != boostDisabled { - limit := lp.GetBatteryBoostLimit() - if limit < 100 { - batterySoc := lp.site.GetBatterySoc() - if batterySoc < float64(limit) { + if limit := lp.GetBatteryBoostLimit(); limit < 100 { + if batterySoc := lp.site.GetBatterySoc(); batterySoc < float64(limit) { lp.log.DEBUG.Printf("battery boost disabled: soc below limit (%.0f%% < %d%%)", batterySoc, limit) - _ = lp.SetBatteryBoost(false) + + if err := lp.SetBatteryBoost(false); err != nil { + lp.log.ERROR.Printf("set battery boost: %v", err) + } } } }