-
-
Notifications
You must be signed in to change notification settings - Fork 623
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updates to Porsche Vehicle API #512
Conversation
DerAndereAndi
commented
Dec 8, 2020
•
edited
Loading
edited
- Added remaining range value without converting any metrics as it is assuming the metric is set to km and not miles
- Added finding the VIN of the vehicle automatically if no VIN is provided
vehicle/porsche.go
Outdated
log.DEBUG.Printf("found vehicle: %v", v.vin) | ||
} | ||
} | ||
v.chargerG = provider.NewCached(v.chargeState, cc.Cache).InterfaceGetter() | ||
|
||
return v, nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Da fehlt das Handling von err != nil. Meist hab ichs so gelöst;
err := v.authFlow()
if err == nil && cc.VIN == "" {
v.vin, err = findVehicle(v.vehicles(v.userID))
if err == nil {
log.DEBUG.Printf("found vehicle: %v", v.vin)
}
}
v.API = kamereon.New(provider.NewCached(v.batteryAPI, cc.Cache).InterfaceGetter())
return v, err
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Der Fehler muss zurück
@andig |
ja, absolut. eigentlich schön, dass der fehler jetzt beim init fliegt und nicht erst bei der benutzung ;) |
Squash und rein? |