Re-add pairing check (#2476)

The new API doesn't seem to have a replacement for this yet, and the "old" check works with cars needing the new API for getting SoC values.

So we just add the check back in for now.
This commit is contained in:
Andreas Linde 2022-02-03 12:14:27 +01:00 • committed by GitHub
parent ede80365cc
commit dcb6b65002
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -69,9 +69,9 @@ func NewPorscheFromConfig(other map[string]interface{}) (api.Vehicle, error) {
}
// check if vehicle is paired
// if res, err := api.PairingStatus(cc.VIN); err == nil && res.Status != porsche.PairingComplete {
// return nil, errors.New("vehicle is not paired with the My Porsche account")
// }
if res, err := api.PairingStatus(cc.VIN); err == nil && res.Status != porsche.PairingComplete {
return nil, errors.New("vehicle is not paired with the My Porsche account")
}
// check if vehicle provides status:
// some PHEVs do not provide any data