From fa70a0a4abe48cb56467713761d6d53769acb8a8 Mon Sep 17 00:00:00 2001 From: SMKRV Date: Fri, 22 Nov 2024 12:28:49 +0300 Subject: [PATCH] Release v2.0.0 --- custom_components/ha_text_ai/coordinator.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/custom_components/ha_text_ai/coordinator.py b/custom_components/ha_text_ai/coordinator.py index 3450c50..13ff0ad 100644 --- a/custom_components/ha_text_ai/coordinator.py +++ b/custom_components/ha_text_ai/coordinator.py @@ -469,10 +469,10 @@ class HATextAICoordinator(DataUpdateCoordinator): except asyncio.QueueEmpty: break - if hasattr(self.client, 'close'): - await self.client.close() - elif hasattr(self.client, '_client') and hasattr(self.client._client, 'aclose'): - await self.client._client.aclose() + if hasattr(self.client, 'close'): + await self.client.close() + elif hasattr(self.client, '_client') and hasattr(self.client._client, 'aclose'): + await self.client._client.aclose() self._is_ready = False self._endpoint_status = "disconnected" @@ -481,7 +481,7 @@ class HATextAICoordinator(DataUpdateCoordinator): self._update_final_metrics() except Exception as err: - _LOGGER.error("Error during shutdown: %s", err) + _LOGGER.error("Error during shutdown: %s", err) def _update_final_metrics(self) -> None: """Update final metrics before shutdown."""