From f6c0e6265e6d4078e77d1665ddfe9abd28491049 Mon Sep 17 00:00:00 2001 From: SMKRV Date: Thu, 21 Nov 2024 18:05:45 +0300 Subject: [PATCH] Release v2.0.0 --- custom_components/ha_text_ai/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/custom_components/ha_text_ai/__init__.py b/custom_components/ha_text_ai/__init__.py index 32c5d14..2968c5e 100644 --- a/custom_components/ha_text_ai/__init__.py +++ b/custom_components/ha_text_ai/__init__.py @@ -204,7 +204,6 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: else: raise ConfigEntryNotReady("Failed to connect to API") - # Create coordinator try: # Create coordinator coordinator = HATextAICoordinator( @@ -237,6 +236,11 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: _LOGGER.exception("Error initializing coordinator: %s", str(ex)) raise ConfigEntryNotReady(f"Error initializing coordinator: {str(ex)}") from ex + except Exception as ex: + _LOGGER.exception("Setup error: %s", str(ex)) + raise ConfigEntryNotReady(f"Setup error: {str(ex)}") from ex + + async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: """Unload a config entry.""" try: