Skip to content

Commit

Permalink
Easee: poll op_mode on startup (evcc-io#10403)
Browse files Browse the repository at this point in the history
  • Loading branch information
GrimmiMeloni authored Oct 20, 2023
1 parent b6f1d77 commit 25f6e13
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions charger/easee.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 25f6e13

Please sign in to comment.