Skip to content

Commit a56a8b1

Browse files
authored
Smartevse: add delay (#24393)
1 parent ef22d42 commit a56a8b1

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

charger/smartevse.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import (
2323
"fmt"
2424
"strconv"
2525
"strings"
26+
"time"
2627

2728
"github.com/evcc-io/evcc/api"
2829
"github.com/evcc-io/evcc/util"
@@ -242,8 +243,17 @@ func (wb *smartEVSE) Phases1p3p(phases int) error {
242243
}
243244

244245
return whenDisabled(wb, func() error {
246+
// Wait 10 seconds before switching phases
247+
// can this option be made configurable in evcc.yaml?
248+
time.Sleep(10 * time.Second)
249+
245250
// Switch phases
246251
_, err := wb.conn.WriteSingleRegister(smartEVSERegSettings, settings)
252+
if err != nil {
253+
// Wait 10 seconds after switching phases
254+
time.Sleep(10 * time.Second)
255+
}
256+
247257
return err
248258
})
249259
}

0 commit comments

Comments
 (0)