Smartevse: add delay (#24393)
This commit is contained in:
parent
ef22d42cf2
commit
a56a8b157c
1 changed files with 10 additions and 0 deletions
|
|
@ -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
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue