From 9bbfe13ff41a29380cc2aecaac4f472693c92e90 Mon Sep 17 00:00:00 2001 From: Richard van den Berg Date: Sun, 4 Feb 2024 12:54:17 +0100 Subject: [PATCH] Only add vehicles to carApiVehicles --- lib/TWCManager/Vehicle/TeslaAPI.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/TWCManager/Vehicle/TeslaAPI.py b/lib/TWCManager/Vehicle/TeslaAPI.py index a0e4cdcc..2899257c 100644 --- a/lib/TWCManager/Vehicle/TeslaAPI.py +++ b/lib/TWCManager/Vehicle/TeslaAPI.py @@ -89,8 +89,8 @@ def __init__(self, master): self.generateChallenge() def addVehicle(self, json): - self.carApiVehicles.append(CarApiVehicle(json, self, self.config)) - return True + if "vin" in json: + self.carApiVehicles.append(CarApiVehicle(json, self, self.config)) def apiDebugInterface(self, command, vehicleID, parameters): # Provides an interface from the Web UI to allow commands to be run interactively