From 49a597a5da11928ad8968f4ea26549620fff3578 Mon Sep 17 00:00:00 2001 From: andig Date: Wed, 19 Mar 2025 14:09:27 +0100 Subject: [PATCH] Loadpoint: fix phase switching incorrectly configured --- core/loadpoint.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/core/loadpoint.go b/core/loadpoint.go index 61cb7a562..f9475a50c 100644 --- a/core/loadpoint.go +++ b/core/loadpoint.go @@ -188,12 +188,6 @@ func NewLoadpointFromConfig(log *util.Logger, settings settings.Settings, other lp.Soc.Poll.Mode = loadpoint.PollCharging } - // phase switching defaults based on charger capabilities - if !lp.hasPhaseSwitching() { - lp.phasesConfigured = 3 - lp.phases = 3 - } - // validate thresholds if lp.Enable.Threshold > lp.Disable.Threshold { lp.log.WARN.Printf("PV mode enable threshold (%.0fW) is larger than disable threshold (%.0fW)", lp.Enable.Threshold, lp.Disable.Threshold) @@ -250,6 +244,12 @@ func NewLoadpointFromConfig(log *util.Logger, settings settings.Settings, other lp.charger = dev.Instance() lp.configureChargerType(lp.charger) + // phase switching defaults based on charger capabilities + if !lp.hasPhaseSwitching() { + lp.phasesConfigured = 3 + lp.phases = 3 + } + return lp, nil }