Closed Rudi9719 closed 3 years ago
Seems that would better be float- do you want to provide a PR?
Not sure if that's the issue, looks like it is already a float64?
SpeedLimitMode struct {
Active bool `json:"active"`
CurrentLimitMph float64 `json:"current_limit_mph"`
MaxLimitMph float64 `json:"max_limit_mph"`
MinLimitMph float64 `json:"min_limit_mph"`
PinCodeSet bool `json:"pin_code_set"`
} `json:"speed_limit_mode"`
Are you using an outdated version?
I'm not sure; I just pulled it this morning so I don't think so? Unless I'm missing a tag or something
github.com/bogosj/tesla v1.0.0
Seems like there have been commits since the last release v1.0.0, maybe that's the issue? (Sorry, accidentally closed prematurely)
Are you using the latest commit (really same question as above)?
Not sure how to check with Go modules (required for go 1.16+). I assume that for therecipe/qt, and x/oauth with the v0.0.0, but then there's a timestamp of some sort followed by what I assume is the commit hash?
github.com/bogosj/tesla v1.0.0
github.com/therecipe/qt v0.0.0-20200904063919-c0c124a5770d
golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914
samhofi.us/x/keybase/v2 v2.1.1
)
go get github.com/bogosj/tesla@0e5b7bb5e9240d8b9adc69242a364b36c7341938
solved the issue, thank you!
Or ….@main to fetch the latest commit.
Receiving the following error when calling
Unable to get Vehicle State: json: cannot unmarshal number 50.0 into Go struct field .response.speed_limit_mode.min_limit_mph of type int