From a4eb6d4a3ef29c7132ade4f107bebeb3117db57a Mon Sep 17 00:00:00 2001 From: Alvaro Duarte <59612788+ad-ha@users.noreply.github.com> Date: Mon, 18 Nov 2024 12:09:40 +0100 Subject: [PATCH] Update coordinator.py --- custom_components/mg_saic/coordinator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/mg_saic/coordinator.py b/custom_components/mg_saic/coordinator.py index f0779ff..b1cec8c 100644 --- a/custom_components/mg_saic/coordinator.py +++ b/custom_components/mg_saic/coordinator.py @@ -136,7 +136,7 @@ async def _async_update_data(self): except (GenericResponseException, UpdateFailed) as e: LOGGER.warning("Data invalid or generic: %s", e) retries += 1 - delay = min(retries * RETRY_BACKOFF_FACTOR, MAX_RETRY_DELAY) + delay = min(RETRY_BACKOFF_FACTOR, MAX_RETRY_DELAY) LOGGER.info( "Retrying in %s seconds... (Attempt %d/%d)", delay, @@ -148,7 +148,7 @@ async def _async_update_data(self): except Exception as e: LOGGER.error("Error fetching data: %s", e) retries += 1 - delay = min(retries * RETRY_BACKOFF_FACTOR, MAX_RETRY_DELAY) + delay = min(RETRY_BACKOFF_FACTOR, MAX_RETRY_DELAY) LOGGER.info( "Retrying in %s seconds... (Attempt %d/%d)", delay,