Easee: poll op_mode on startup (#10403)
This commit is contained in:
parent
b6f1d77ea7
commit
25f6e1311a
1 changed files with 6 additions and 0 deletions
|
|
@ -189,6 +189,12 @@ func NewEasee(user, password, charger string, timeout time.Duration, authorize b
|
|||
err = os.ErrDeadlineExceeded
|
||||
}
|
||||
|
||||
if err == nil {
|
||||
// poll opMode from charger as API can give outdated initial data
|
||||
uri := fmt.Sprintf("%s/chargers/%s/commands/poll_chargeropmode", easee.API, c.charger)
|
||||
_, err = c.Post(uri, request.JSONContent, nil)
|
||||
}
|
||||
|
||||
return c, err
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue