mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 21:57:51 +00:00
Handle unhandled exceptions related to unavailable SimpliSafe features (#38812)
This commit is contained in:
parent
991bf126d4
commit
9e21fb6b52
@ -3,7 +3,7 @@ import asyncio
|
|||||||
from uuid import UUID
|
from uuid import UUID
|
||||||
|
|
||||||
from simplipy import API
|
from simplipy import API
|
||||||
from simplipy.errors import InvalidCredentialsError, SimplipyError
|
from simplipy.errors import EndpointUnavailable, InvalidCredentialsError, SimplipyError
|
||||||
from simplipy.websocket import (
|
from simplipy.websocket import (
|
||||||
EVENT_CAMERA_MOTION_DETECTED,
|
EVENT_CAMERA_MOTION_DETECTED,
|
||||||
EVENT_CONNECTION_LOST,
|
EVENT_CONNECTION_LOST,
|
||||||
@ -555,6 +555,13 @@ class SimpliSafe:
|
|||||||
LOGGER.error("Error while using stored refresh token: %s", err)
|
LOGGER.error("Error while using stored refresh token: %s", err)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if isinstance(result, EndpointUnavailable):
|
||||||
|
# In case the user attempt an action not allowed in their current plan,
|
||||||
|
# we merely log that message at INFO level (so the user is aware,
|
||||||
|
# but not spammed with ERROR messages that they cannot change):
|
||||||
|
LOGGER.info(result)
|
||||||
|
return
|
||||||
|
|
||||||
if isinstance(result, SimplipyError):
|
if isinstance(result, SimplipyError):
|
||||||
LOGGER.error("SimpliSafe error while updating: %s", result)
|
LOGGER.error("SimpliSafe error while updating: %s", result)
|
||||||
return
|
return
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
"name": "SimpliSafe",
|
"name": "SimpliSafe",
|
||||||
"config_flow": true,
|
"config_flow": true,
|
||||||
"documentation": "https://www.home-assistant.io/integrations/simplisafe",
|
"documentation": "https://www.home-assistant.io/integrations/simplisafe",
|
||||||
"requirements": ["simplisafe-python==9.2.2"],
|
"requirements": ["simplisafe-python==9.3.0"],
|
||||||
"codeowners": ["@bachya"]
|
"codeowners": ["@bachya"]
|
||||||
}
|
}
|
||||||
|
@ -1975,7 +1975,7 @@ simplehound==0.3
|
|||||||
simplepush==1.1.4
|
simplepush==1.1.4
|
||||||
|
|
||||||
# homeassistant.components.simplisafe
|
# homeassistant.components.simplisafe
|
||||||
simplisafe-python==9.2.2
|
simplisafe-python==9.3.0
|
||||||
|
|
||||||
# homeassistant.components.sisyphus
|
# homeassistant.components.sisyphus
|
||||||
sisyphus-control==2.2.1
|
sisyphus-control==2.2.1
|
||||||
|
@ -893,7 +893,7 @@ sentry-sdk==0.13.5
|
|||||||
simplehound==0.3
|
simplehound==0.3
|
||||||
|
|
||||||
# homeassistant.components.simplisafe
|
# homeassistant.components.simplisafe
|
||||||
simplisafe-python==9.2.2
|
simplisafe-python==9.3.0
|
||||||
|
|
||||||
# homeassistant.components.sleepiq
|
# homeassistant.components.sleepiq
|
||||||
sleepyq==0.7
|
sleepyq==0.7
|
||||||
|
Loading…
x
Reference in New Issue
Block a user