Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump PyOverkiz and move to Somfy OAuth #715

Merged
merged 11 commits into from
Jan 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions custom_components/tahoma/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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

Expand Down
6 changes: 4 additions & 2 deletions custom_components/tahoma/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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*",
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pyoverkiz==1.1.1
pyoverkiz==1.3.0