diff --git a/custom_components/tahoma/coordinator.py b/custom_components/tahoma/coordinator.py index 0fba4e68..c73d6c72 100644 --- a/custom_components/tahoma/coordinator.py +++ b/custom_components/tahoma/coordinator.py @@ -8,7 +8,11 @@ from aiohttp import ServerDisconnectedError from homeassistant.core import HomeAssistant from homeassistant.helpers import device_registry as dr -from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed +from homeassistant.helpers.update_coordinator import ( + ConfigEntryAuthFailed, + DataUpdateCoordinator, + UpdateFailed, +) from homeassistant.util.decorator import Registry from pyoverkiz.client import OverkizClient from pyoverkiz.enums import EventName, ExecutionState @@ -67,9 +71,7 @@ async def _async_update_data(self) -> dict[str, Device]: try: events = await self.client.fetch_events() except BadCredentialsException as exception: - # Keep retrying until Somfy fixes their servers (https://github.com/iMicknl/ha-tahoma/issues/599) - raise UpdateFailed("Invalid authentication.") from exception - # raise ConfigEntryAuthFailed() from exception + raise ConfigEntryAuthFailed() from exception except TooManyRequestsException as exception: raise UpdateFailed("Too many requests, try again later.") from exception except MaintenanceException as exception: @@ -84,9 +86,7 @@ async def _async_update_data(self) -> dict[str, Device]: await self.client.login() self.devices = await self._get_devices() except BadCredentialsException as exception: - # Keep retrying until Somfy fixes their servers (https://github.com/iMicknl/ha-tahoma/issues/599) - raise UpdateFailed("Invalid authentication.") from exception - # raise ConfigEntryAuthFailed() from exception + raise ConfigEntryAuthFailed() from exception except TooManyRequestsException as exception: raise UpdateFailed("Too many requests, try again later.") from exception diff --git a/custom_components/tahoma/manifest.json b/custom_components/tahoma/manifest.json index d96f0944..2e997c15 100644 --- a/custom_components/tahoma/manifest.json +++ b/custom_components/tahoma/manifest.json @@ -5,7 +5,7 @@ "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/tahoma", "requirements": [ - "pyoverkiz==1.1.1" + "pyoverkiz==1.3.0" ], "codeowners": [ "@imicknl", @@ -14,7 +14,9 @@ ], "issue_tracker": "https://github.com/imicknl/ha-tahoma/issues", "version": "2.11", - "zeroconf": ["_kizbox._tcp.local."], + "zeroconf": [ + "_kizbox._tcp.local." + ], "dhcp": [ { "hostname": "gateway*", diff --git a/requirements.txt b/requirements.txt index e158cdde..e756115c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ -pyoverkiz==1.1.1 \ No newline at end of file +pyoverkiz==1.3.0 \ No newline at end of file