Skip to content

Commit

Permalink
Tesla: fix asleep detection
Browse files Browse the repository at this point in the history
  • Loading branch information
andig committed Jan 24, 2025
1 parent 609b55f commit 0a83391
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vehicle/tesla/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func addInstance(subject string, identity *Identity) {
func apiError(err error) error {
if err != nil && (errors.Is(err, inet.ErrVehicleNotAwake) ||
strings.HasSuffix(err.Error(), "408 Request Timeout") || strings.HasSuffix(err.Error(), "408 (Request Timeout)") ||
strings.HasSuffix(err.Error(), "vehicle is offline or asleep")) {
strings.Contains(err.Error(), "vehicle is offline or asleep")) {
err = api.ErrAsleep
}
return err
Expand Down

2 comments on commit 0a83391

@traxmaster666
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe the question seems dumb... but how do I get the change in the helper.go? I can´t find an installation folder of evcc on my raspi. I´ve made a downgrade and then an upgrade (-> sudo apt install evcc=x.xxx.x # Versionsnummer). Is this the solution? Are the changes above in the newer available 0.133.0 already inside? Thanks and sorry for this question! Thanks a lot for all the work, you´ve done!

@andig
Copy link
Member Author

@andig andig commented on 0a83391 Jan 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just try the nightly. Thank you.

Please sign in to comment.