From 71918c857fca3cc0c1dd561bd6ef9aa66af34028 Mon Sep 17 00:00:00 2001 From: Richard van den Berg Date: Thu, 13 Jun 2024 16:16:48 +0200 Subject: [PATCH] Set carApiLastErrorTime at 429 in get_car_api() --- lib/TWCManager/Vehicle/TeslaAPI.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/TWCManager/Vehicle/TeslaAPI.py b/lib/TWCManager/Vehicle/TeslaAPI.py index 3b730df5..c86fc742 100644 --- a/lib/TWCManager/Vehicle/TeslaAPI.py +++ b/lib/TWCManager/Vehicle/TeslaAPI.py @@ -1441,6 +1441,7 @@ def get_car_api(self, url, checkReady=True, provesOnline=True): elif req.status_code == 429: # We're explicitly being told to back off self.errorCount = max(30, self.errorCount) + self.updateCarApiLastErrorTime() return False, None except json.decoder.JSONDecodeError: pass