Skip to content

Commit

Permalink
Upgrade Verisure to 2.6.6 (#98258)
Browse files Browse the repository at this point in the history
  • Loading branch information
niro1987 committed Aug 25, 2023
1 parent 48b6b1c commit c2713f0
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
14 changes: 11 additions & 3 deletions homeassistant/components/verisure/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ async def async_login(self) -> bool:
try:
await self.hass.async_add_executor_job(self.verisure.login_cookie)
except VerisureLoginError as ex:
LOGGER.error("Could not log in to verisure, %s", ex)
LOGGER.error("Credentials expired for Verisure, %s", ex)
raise ConfigEntryAuthFailed("Credentials expired for Verisure") from ex
except VerisureError as ex:
LOGGER.error("Could not log in to verisure, %s", ex)
Expand All @@ -63,8 +63,16 @@ async def _async_update_data(self) -> dict:
"""Fetch data from Verisure."""
try:
await self.hass.async_add_executor_job(self.verisure.update_cookie)
except VerisureLoginError as ex:
raise ConfigEntryAuthFailed("Credentials expired for Verisure") from ex
except VerisureLoginError:
LOGGER.debug("Cookie expired, acquiring new cookies")
try:
await self.hass.async_add_executor_job(self.verisure.login_cookie)
except VerisureLoginError as ex:
LOGGER.error("Credentials expired for Verisure, %s", ex)
raise ConfigEntryAuthFailed("Credentials expired for Verisure") from ex
except VerisureError 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:
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.4"]
"requirements": ["vsure==2.6.6"]
}
2 changes: 1 addition & 1 deletion requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2647,7 +2647,7 @@ volkszaehler==0.4.0
volvooncall==0.10.3

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

# 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 @@ -1941,7 +1941,7 @@ voip-utils==0.1.0
volvooncall==0.10.3

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

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

0 comments on commit c2713f0

Please sign in to comment.