8
8
from aiohttp import ServerDisconnectedError
9
9
from homeassistant .core import HomeAssistant
10
10
from homeassistant .helpers import device_registry as dr
11
- from homeassistant .helpers .update_coordinator import DataUpdateCoordinator , UpdateFailed
11
+ from homeassistant .helpers .update_coordinator import (
12
+ ConfigEntryAuthFailed ,
13
+ DataUpdateCoordinator ,
14
+ UpdateFailed ,
15
+ )
12
16
from homeassistant .util .decorator import Registry
13
17
from pyoverkiz .client import OverkizClient
14
18
from pyoverkiz .enums import EventName , ExecutionState
@@ -67,9 +71,7 @@ async def _async_update_data(self) -> dict[str, Device]:
67
71
try :
68
72
events = await self .client .fetch_events ()
69
73
except BadCredentialsException as exception :
70
- # Keep retrying until Somfy fixes their servers (https://github.com/iMicknl/ha-tahoma/issues/599)
71
- raise UpdateFailed ("Invalid authentication." ) from exception
72
- # raise ConfigEntryAuthFailed() from exception
74
+ raise ConfigEntryAuthFailed () from exception
73
75
except TooManyRequestsException as exception :
74
76
raise UpdateFailed ("Too many requests, try again later." ) from exception
75
77
except MaintenanceException as exception :
@@ -84,9 +86,7 @@ async def _async_update_data(self) -> dict[str, Device]:
84
86
await self .client .login ()
85
87
self .devices = await self ._get_devices ()
86
88
except BadCredentialsException as exception :
87
- # Keep retrying until Somfy fixes their servers (https://github.com/iMicknl/ha-tahoma/issues/599)
88
- raise UpdateFailed ("Invalid authentication." ) from exception
89
- # raise ConfigEntryAuthFailed() from exception
89
+ raise ConfigEntryAuthFailed () from exception
90
90
except TooManyRequestsException as exception :
91
91
raise UpdateFailed ("Too many requests, try again later." ) from exception
92
92
0 commit comments