From a813302e86d518023f7347fd37688c697a2aa2b3 Mon Sep 17 00:00:00 2001 From: SMKRV Date: Fri, 22 Nov 2024 02:45:31 +0300 Subject: [PATCH] Release v2.0.0 --- custom_components/ha_text_ai/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/custom_components/ha_text_ai/__init__.py b/custom_components/ha_text_ai/__init__.py index fb34163..d47e566 100644 --- a/custom_components/ha_text_ai/__init__.py +++ b/custom_components/ha_text_ai/__init__.py @@ -35,7 +35,6 @@ from .const import ( DEFAULT_REQUEST_INTERVAL, API_TIMEOUT, API_RETRY_COUNT, - API_BACKOFF_FACTOR, SERVICE_ASK_QUESTION, SERVICE_CLEAR_HISTORY, SERVICE_SET_SYSTEM_PROMPT, @@ -195,7 +194,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: if await async_check_api(session, endpoint, headers, api_provider): break if attempt < API_RETRY_COUNT - 1: - delay = API_BACKOFF_FACTOR * (2 ** attempt) + delay = 1.5 * (2 ** attempt) await asyncio.sleep(delay) else: raise ConfigEntryNotReady("Failed to connect to API")