Smartevse: add delay (#24393)

This commit is contained in:
Sven 2025-10-26 22:18:08 +01:00 • committed by GitHub
parent ef22d42cf2
commit a56a8b157c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -23,6 +23,7 @@ import (
"fmt"
"strconv"
"strings"
"time"
"github.com/evcc-io/evcc/api"
"github.com/evcc-io/evcc/util"
@ -242,8 +243,17 @@ func (wb *smartEVSE) Phases1p3p(phases int) error {
}
return whenDisabled(wb, func() error {
// Wait 10 seconds before switching phases
// can this option be made configurable in evcc.yaml?
time.Sleep(10 * time.Second)
// Switch phases
_, err := wb.conn.WriteSingleRegister(smartEVSERegSettings, settings)
if err != nil {
// Wait 10 seconds after switching phases
time.Sleep(10 * time.Second)
}
return err
})
}