mirror of
https://github.com/smkrv/ha-text-ai.git
synced 2026-07-28 10:04:00 +08:00
Release v2.0.0
This commit is contained in:
@@ -469,10 +469,10 @@ class HATextAICoordinator(DataUpdateCoordinator):
|
|||||||
except asyncio.QueueEmpty:
|
except asyncio.QueueEmpty:
|
||||||
break
|
break
|
||||||
|
|
||||||
if hasattr(self.client, 'close'):
|
if hasattr(self.client, 'close'):
|
||||||
await self.client.close()
|
await self.client.close()
|
||||||
elif hasattr(self.client, '_client') and hasattr(self.client._client, 'aclose'):
|
elif hasattr(self.client, '_client') and hasattr(self.client._client, 'aclose'):
|
||||||
await self.client._client.aclose()
|
await self.client._client.aclose()
|
||||||
|
|
||||||
self._is_ready = False
|
self._is_ready = False
|
||||||
self._endpoint_status = "disconnected"
|
self._endpoint_status = "disconnected"
|
||||||
@@ -481,7 +481,7 @@ class HATextAICoordinator(DataUpdateCoordinator):
|
|||||||
self._update_final_metrics()
|
self._update_final_metrics()
|
||||||
|
|
||||||
except Exception as err:
|
except Exception as err:
|
||||||
_LOGGER.error("Error during shutdown: %s", err)
|
_LOGGER.error("Error during shutdown: %s", err)
|
||||||
|
|
||||||
def _update_final_metrics(self) -> None:
|
def _update_final_metrics(self) -> None:
|
||||||
"""Update final metrics before shutdown."""
|
"""Update final metrics before shutdown."""
|
||||||
|
|||||||
Reference in New Issue
Block a user