Easee: poll op_mode on startup (#10403)

This commit is contained in:
Michael Heß 2023-10-20 19:10:53 +02:00 • committed by GitHub
parent b6f1d77ea7
commit 25f6e1311a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
}