From 28cd74565f5c2a701454c86a4364f7538b518504 Mon Sep 17 00:00:00 2001 From: Richard van den Berg Date: Tue, 23 Jan 2024 13:46:39 +0100 Subject: [PATCH] Get list of vehicles using products endpoint for Owner API --- lib/TWCManager/Vehicle/TeslaAPI.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/TWCManager/Vehicle/TeslaAPI.py b/lib/TWCManager/Vehicle/TeslaAPI.py index a18ab055..5a0d1ada 100644 --- a/lib/TWCManager/Vehicle/TeslaAPI.py +++ b/lib/TWCManager/Vehicle/TeslaAPI.py @@ -229,6 +229,9 @@ def car_api_available( if self.getCarApiBearerToken() != "": if self.getVehicleCount() < 1: url = self.baseURL + if 'owner-api' in url: + url = url.replace('vehicles', 'products') + else: headers = { "accept": "application/json", "Authorization": "Bearer " + self.getCarApiBearerToken(),