From dcb6b650027d783fee714808d53dc15bab71c94b Mon Sep 17 00:00:00 2001 From: Andreas Linde <42185+DerAndereAndi@users.noreply.github.com> Date: Thu, 3 Feb 2022 12:14:27 +0100 Subject: [PATCH] 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. --- vehicle/porsche.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vehicle/porsche.go b/vehicle/porsche.go index d1f8e5280..b1edb58b2 100644 --- a/vehicle/porsche.go +++ b/vehicle/porsche.go @@ -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