diff --git a/go.mod b/go.mod index cc9fea744..cd2666a14 100644 --- a/go.mod +++ b/go.mod @@ -28,7 +28,7 @@ require ( github.com/eclipse/paho.mqtt.golang v1.4.3 github.com/enbility/cemd v0.2.2 github.com/enbility/eebus-go v0.2.0 - github.com/evcc-io/tesla-proxy-client v0.0.0-20240217133531-c8fc01cb2151 + github.com/evcc-io/tesla-proxy-client v0.0.0-20240219081629-3afc7df83f15 github.com/fatih/structs v1.1.0 github.com/glebarez/sqlite v1.10.0 github.com/go-http-utils/etag v0.0.0-20161124023236-513ea8f21eb1 diff --git a/go.sum b/go.sum index 599b69335..405efad16 100644 --- a/go.sum +++ b/go.sum @@ -134,8 +134,8 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evcc-io/modbus v0.0.0-20230705160100-23e1df2c01c3 h1:QBtLqy85cy9KLRWqKxX+42bN1rWti8iU7pL7Vwf2UbE= github.com/evcc-io/modbus v0.0.0-20230705160100-23e1df2c01c3/go.mod h1:qVX2WhsI5xyAoM6I/MV1bXSKBPdLAjp7pCvieO/S0AY= -github.com/evcc-io/tesla-proxy-client v0.0.0-20240217133531-c8fc01cb2151 h1:nnRPTOA++dAAzY/bOJbsXquI1UgSXey4k8so2i6o96E= -github.com/evcc-io/tesla-proxy-client v0.0.0-20240217133531-c8fc01cb2151/go.mod h1:zWtAweBqXJTk3HSrPSecz3Q3a2hAUQ4vOE6paJfn03I= +github.com/evcc-io/tesla-proxy-client v0.0.0-20240219081629-3afc7df83f15 h1:KWuX06b4nUyghzzN9QpAzC7kCW8Re9uL4ceZ1N04qGQ= +github.com/evcc-io/tesla-proxy-client v0.0.0-20240219081629-3afc7df83f15/go.mod h1:zWtAweBqXJTk3HSrPSecz3Q3a2hAUQ4vOE6paJfn03I= github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= diff --git a/vehicle/tesla/helper.go b/vehicle/tesla/helper.go index 1cdc3aa6e..af2a8071c 100644 --- a/vehicle/tesla/helper.go +++ b/vehicle/tesla/helper.go @@ -25,7 +25,8 @@ func addInstance(subject string, identity *Identity) { // apiError converts HTTP 408 error to ErrTimeout 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(), "408 Request Timeout") || strings.HasSuffix(err.Error(), "408 (Request Timeout)")) || + strings.HasSuffix(err.Error(), "vehicle is offline or asleep") { err = api.ErrAsleep } return err