From 3417c8383b6df6011c1918b92d25ecf68f9c5abb Mon Sep 17 00:00:00 2001 From: Richard van den Berg Date: Thu, 13 Jun 2024 21:47:58 +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..c37f6eb1 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.carapi.updateCarApiLastErrorTime() return False, None except json.decoder.JSONDecodeError: pass