Log cannot connect exception in Tedee config flow (#113740)

log exception
pull/113407/head^2
Josef Zweck 2024-03-18 16:45:49 +01:00 committed by GitHub
parent 8918eb6922
commit eaf86ee1ea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

View File

@ -1,6 +1,7 @@
"""Config flow for Tedee integration."""
from collections.abc import Mapping
import logging
from typing import Any
from pytedee_async import (
@ -18,6 +19,8 @@ from homeassistant.helpers.aiohttp_client import async_get_clientsession
from .const import CONF_LOCAL_ACCESS_TOKEN, DOMAIN, NAME
_LOGGER = logging.getLogger(__name__)
class TedeeConfigFlow(ConfigFlow, domain=DOMAIN):
"""Handle a config flow for Tedee."""
@ -47,7 +50,8 @@ class TedeeConfigFlow(ConfigFlow, domain=DOMAIN):
errors[CONF_LOCAL_ACCESS_TOKEN] = "invalid_api_key"
except TedeeClientException:
errors[CONF_HOST] = "invalid_host"
except TedeeDataUpdateException:
except TedeeDataUpdateException as exc:
_LOGGER.error("Error during local bridge discovery: %s", exc)
errors["base"] = "cannot_connect"
else:
if self.reauth_entry: