Loadpoint: honor physical phases on init (#22441)

This commit is contained in:
andig 2025-07-18 18:00:55 +02:00 • committed by GitHub
parent 11f856b1ca
commit 4b5d0762e3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -251,8 +251,13 @@ func NewLoadpointFromConfig(log *util.Logger, settings settings.Settings, other
// phase switching defaults based on charger capabilities
if !lp.hasPhaseSwitching() {
lp.phasesConfigured = 3
lp.phases = 3
phases := lp.getChargerPhysicalPhases()
if phases == 0 {
phases = 3 // default to 3p if no charger phases are known
}
lp.phasesConfigured = phases
lp.phases = phases
}
return lp, nil