diff --git a/core/loadpoint_api.go b/core/loadpoint_api.go index a45089461..ebd41f32c 100644 --- a/core/loadpoint_api.go +++ b/core/loadpoint_api.go @@ -265,6 +265,10 @@ func (lp *Loadpoint) SetPhasesConfigured(phases int) error { return fmt.Errorf("invalid number of phases: %d", phases) } + if physical := lp.getChargerPhysicalPhases(); physical != 0 && phases > physical { + return fmt.Errorf("cannot configure more phases than physically connected: %d > %d", phases, physical) + } + // set new default lp.log.DEBUG.Println("set phases:", phases)