Skip to content

Commit 70df164

Browse files
authored
Bump PyOverkiz and move to Somfy OAuth (#715)
* Rewrite coordinator * Add reauth code back * Add oauth + debug logging * Update pyhoma * Update version * update deps * Update to pyhoma 1.3.0 * Update config_flow.py * Update config_flow.py * Update coordinator.py
1 parent 8da903f commit 70df164

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

custom_components/tahoma/coordinator.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@
88
from aiohttp import ServerDisconnectedError
99
from homeassistant.core import HomeAssistant
1010
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+
)
1216
from homeassistant.util.decorator import Registry
1317
from pyoverkiz.client import OverkizClient
1418
from pyoverkiz.enums import EventName, ExecutionState
@@ -67,9 +71,7 @@ async def _async_update_data(self) -> dict[str, Device]:
6771
try:
6872
events = await self.client.fetch_events()
6973
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
7375
except TooManyRequestsException as exception:
7476
raise UpdateFailed("Too many requests, try again later.") from exception
7577
except MaintenanceException as exception:
@@ -84,9 +86,7 @@ async def _async_update_data(self) -> dict[str, Device]:
8486
await self.client.login()
8587
self.devices = await self._get_devices()
8688
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
9090
except TooManyRequestsException as exception:
9191
raise UpdateFailed("Too many requests, try again later.") from exception
9292

custom_components/tahoma/manifest.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"config_flow": true,
66
"documentation": "https://www.home-assistant.io/integrations/tahoma",
77
"requirements": [
8-
"pyoverkiz==1.1.1"
8+
"pyoverkiz==1.3.0"
99
],
1010
"codeowners": [
1111
"@imicknl",
@@ -14,7 +14,9 @@
1414
],
1515
"issue_tracker": "https://github.com/imicknl/ha-tahoma/issues",
1616
"version": "2.11",
17-
"zeroconf": ["_kizbox._tcp.local."],
17+
"zeroconf": [
18+
"_kizbox._tcp.local."
19+
],
1820
"dhcp": [
1921
{
2022
"hostname": "gateway*",

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
pyoverkiz==1.1.1
1+
pyoverkiz==1.3.0

0 commit comments

Comments
 (0)