diff --git a/lib/TWCManager/Vehicle/TeslaAPI.py b/lib/TWCManager/Vehicle/TeslaAPI.py index 6664e0a6..3b730df5 100644 --- a/lib/TWCManager/Vehicle/TeslaAPI.py +++ b/lib/TWCManager/Vehicle/TeslaAPI.py @@ -1269,6 +1269,7 @@ def wakeVehicle(self, vehicle): elif req.status_code == 429: # We're explicitly being told to back off self.errorCount = max(30, self.errorCount) + self.updateCarApiLastErrorTime(vehicle) return False except json.decoder.JSONDecodeError: return False @@ -1479,7 +1480,7 @@ def get_car_api(self, url, checkReady=True, provesOnline=True): self.carapi.updateCarApiLastErrorTime(self) return (False, None) - def update_location(self, cacheTime=60): + def update_location(self, cacheTime=300): if self.syncSource == "TeslaAPI": return self.update_vehicle_data(cacheTime) @@ -1490,7 +1491,7 @@ def update_location(self, cacheTime=60): return True - def update_vehicle_data(self, cacheTime=60): + def update_vehicle_data(self, cacheTime=300): url = ( "/".join([self.carapi.getCarApiBaseURL(), str(self.VIN), "vehicle_data"]) + "?endpoints="