Upgrade Verisure to 2.6.4 (#97278)

pull/97609/head
Niels Perfors 2023-07-30 18:53:26 +02:00 committed by Franck Nijhof
parent 768afeee21
commit 78dad22fb3
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3
4 changed files with 6 additions and 16 deletions

View File

@ -7,7 +7,6 @@ from time import sleep
from verisure import (
Error as VerisureError,
LoginError as VerisureLoginError,
ResponseError as VerisureResponseError,
Session as Verisure,
)
@ -50,7 +49,7 @@ class VerisureDataUpdateCoordinator(DataUpdateCoordinator):
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
@ -65,11 +64,9 @@ class VerisureDataUpdateCoordinator(DataUpdateCoordinator):
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,
@ -81,13 +78,6 @@ class VerisureDataUpdateCoordinator(DataUpdateCoordinator):
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

View File

@ -12,5 +12,5 @@
"integration_type": "hub",
"iot_class": "cloud_polling",
"loggers": ["verisure"],
"requirements": ["vsure==2.6.1"]
"requirements": ["vsure==2.6.4"]
}

View File

@ -2634,7 +2634,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

View File

@ -1934,7 +1934,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