Skip to content
This repository has been archived by the owner on May 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #46 from zweckj/main
Browse files Browse the repository at this point in the history
Use next pytedee_async version, config flow exception logs
  • Loading branch information
zweckj authored Nov 18, 2023
2 parents db4e5f7 + ae96511 commit e5f3ab4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions custom_components/tedee/config_flow.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
"""Config flow for Tedee integration."""
import logging

from collections.abc import Mapping
from typing import Any

Expand Down Expand Up @@ -33,6 +35,7 @@
NAME,
)

_LOGGER = logging.getLogger(__name__)

async def validate_input(user_input: dict[str, Any]) -> bool:
"""Validate the user input allows us to connect."""
Expand All @@ -44,8 +47,10 @@ async def validate_input(user_input: dict[str, Any]) -> bool:
try:
await tedee_client.get_locks()
except (TedeeAuthException, TedeeLocalAuthException) as ex:
_LOGGER.exception("Exception in validating input %s", ex)
raise InvalidAuth from ex
except (TedeeClientException, Exception) as ex:
_LOGGER.exception("Exception in validating input %s", ex)
raise CannotConnect from ex
return True

Expand All @@ -56,6 +61,7 @@ async def get_local_bridge(host: str, local_access_token: str) -> TedeeBridge:
try:
return await tedee_client.get_local_bridge()
except (TedeeClientException, Exception) as ex:
_LOGGER.exception("Exception in validating input %s", ex)
raise CannotConnect from ex


Expand Down
2 changes: 1 addition & 1 deletion custom_components/tedee/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"documentation": "https://github.com/patrickhilker/tedee_hass_integration",
"iot_class": "local_push",
"issue_tracker": "https://github.com/patrickhilker/tedee_hass_integration/issues",
"requirements": ["pytedee-async==0.2.2"],
"requirements": ["pytedee-async==0.2.4"],
"version": "2023.11.0"
}

0 comments on commit e5f3ab4

Please sign in to comment.