Treat Huawei LTE error code 100006 as unsupported functionality (#54253)
Internet says 100006 could mean "parameter error", B2368-F20 is reported to respond with that to lan/HostInfo requests. While at it, handle the special case error codes and the "real" not supported exception in the same block. Closes https://github.com/home-assistant/core/issues/53280
This commit is contained in:
parent
28e421dc53
commit
9947795068
1 changed files with 7 additions and 6 deletions
|
@ -185,11 +185,6 @@ class Router:
|
|||
_LOGGER.debug("Getting %s for subscribers %s", key, self.subscriptions[key])
|
||||
try:
|
||||
self.data[key] = func()
|
||||
except ResponseErrorNotSupportedException:
|
||||
_LOGGER.info(
|
||||
"%s not supported by device, excluding from future updates", key
|
||||
)
|
||||
self.subscriptions.pop(key)
|
||||
except ResponseErrorLoginRequiredException:
|
||||
if isinstance(self.connection, AuthorizedConnection):
|
||||
_LOGGER.debug("Trying to authorize again")
|
||||
|
@ -206,7 +201,13 @@ class Router:
|
|||
)
|
||||
self.subscriptions.pop(key)
|
||||
except ResponseErrorException as exc:
|
||||
if exc.code != -1:
|
||||
if not isinstance(
|
||||
exc, ResponseErrorNotSupportedException
|
||||
) and exc.code not in (
|
||||
# additional codes treated as unusupported
|
||||
-1,
|
||||
100006,
|
||||
):
|
||||
raise
|
||||
_LOGGER.info(
|
||||
"%s apparently not supported by device, excluding from future updates",
|
||||
|
|
Loading…
Add table
Reference in a new issue