From 39c137c171545287763b12f82c52db92b483c233 Mon Sep 17 00:00:00 2001 From: DigitalBites Date: Wed, 23 Aug 2023 09:56:42 -0700 Subject: [PATCH] create separate config instance and change max pool configuration for api client --- custom_components/luxor/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/custom_components/luxor/__init__.py b/custom_components/luxor/__init__.py index bb2f418..f00678a 100644 --- a/custom_components/luxor/__init__.py +++ b/custom_components/luxor/__init__.py @@ -27,9 +27,9 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry): hass.data.setdefault(DOMAIN, {}) host = entry.data.get(CONF_HOST) - api_client = luxor_openapi_asyncio.ApiClient( - luxor_openapi_asyncio.Configuration(host="http://{}".format(host)) - ) + api_client_config = luxor_openapi_asyncio.Configuration(host="http://{}".format(host)) + api_client_config.connection_pool_maxsize = 1 + api_client = luxor_openapi_asyncio.ApiClient(api_client_config) api_instance = controller_api.ControllerApi(api_client)