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