Warp: enable phase switching when Energy Manager present (#27962)
This commit is contained in:
parent
1487d37373
commit
4d7a079eeb
1 changed files with 1 additions and 1 deletions
|
|
@ -103,7 +103,7 @@ func NewWarpWSFromConfig(ctx context.Context, other map[string]any) (api.Charger
|
|||
// only setup phase switching methods if power manager endpoint is set
|
||||
var phases func(int) error
|
||||
var getPhases func() (int, error)
|
||||
if w.hasFeature(warp.FeaturePhaseSwitch) && w.pm != nil {
|
||||
if (w.hasFeature(warp.FeaturePhaseSwitch) || cc.EnergyManagerURI != "") && w.pm != nil {
|
||||
if res, err := w.ensurePmState(); err == nil && res.ExternalControl != warp.ExternalControlDeactivated {
|
||||
w.pmState = &res
|
||||
phases = w.phases1p3p
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue