Skip to content

Commit

Permalink
Upgrade Verisure to 2.6.4 (home-assistant#97278)
Browse files Browse the repository at this point in the history
  • Loading branch information
niro1987 authored Jul 30, 2023
1 parent f4e79bb commit a70c10d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 16 deletions.
16 changes: 3 additions & 13 deletions homeassistant/components/verisure/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from verisure import (
Error as VerisureError,
LoginError as VerisureLoginError,
ResponseError as VerisureResponseError,
Session as Verisure,
)

Expand Down Expand Up @@ -50,7 +49,7 @@ async def async_login(self) -> bool:
except VerisureLoginError as ex:
LOGGER.error("Could not log in to verisure, %s", ex)
raise ConfigEntryAuthFailed("Credentials expired for Verisure") from ex
except VerisureResponseError as ex:
except VerisureError as ex:
LOGGER.error("Could not log in to verisure, %s", ex)
return False

Expand All @@ -65,11 +64,9 @@ async def _async_update_data(self) -> dict:
try:
await self.hass.async_add_executor_job(self.verisure.update_cookie)
except VerisureLoginError as ex:
LOGGER.error("Credentials expired for Verisure, %s", ex)
raise ConfigEntryAuthFailed("Credentials expired for Verisure") from ex
except VerisureResponseError as ex:
LOGGER.error("Could not log in to verisure, %s", ex)
raise ConfigEntryAuthFailed("Could not log in to verisure") from ex
except VerisureError as ex:
raise UpdateFailed("Unable to update cookie") from ex
try:
overview = await self.hass.async_add_executor_job(
self.verisure.request,
Expand All @@ -81,13 +78,6 @@ async def _async_update_data(self) -> dict:
self.verisure.smart_lock(),
self.verisure.smartplugs(),
)
except VerisureResponseError as err:
LOGGER.debug("Cookie expired or service unavailable, %s", err)
overview = self._overview
try:
await self.hass.async_add_executor_job(self.verisure.update_cookie)
except VerisureResponseError as ex:
raise ConfigEntryAuthFailed("Credentials for Verisure expired.") from ex
except VerisureError as err:
LOGGER.error("Could not read overview, %s", err)
raise UpdateFailed("Could not read overview") from err
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/verisure/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
"integration_type": "hub",
"iot_class": "cloud_polling",
"loggers": ["verisure"],
"requirements": ["vsure==2.6.1"]
"requirements": ["vsure==2.6.4"]
}
2 changes: 1 addition & 1 deletion requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2637,7 +2637,7 @@ volkszaehler==0.4.0
volvooncall==0.10.3

# homeassistant.components.verisure
vsure==2.6.1
vsure==2.6.4

# homeassistant.components.vasttrafik
vtjp==0.1.14
Expand Down
2 changes: 1 addition & 1 deletion requirements_test_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1937,7 +1937,7 @@ voip-utils==0.1.0
volvooncall==0.10.3

# homeassistant.components.verisure
vsure==2.6.1
vsure==2.6.4

# homeassistant.components.vulcan
vulcan-api==2.3.0
Expand Down

0 comments on commit a70c10d

Please sign in to comment.