mirror of
https://github.com/home-assistant/core
synced 2024-07-24 16:42:06 +02:00
Treat Huawei LTE response error code -1 as apparently unsupported (#45304)
This commit is contained in:
parent
b601e7e497
commit
ded242a8fe
@ -15,6 +15,7 @@ from huawei_lte_api.AuthorizedConnection import AuthorizedConnection
|
||||
from huawei_lte_api.Client import Client
|
||||
from huawei_lte_api.Connection import Connection
|
||||
from huawei_lte_api.exceptions import (
|
||||
ResponseErrorException,
|
||||
ResponseErrorLoginRequiredException,
|
||||
ResponseErrorNotSupportedException,
|
||||
)
|
||||
@ -208,6 +209,14 @@ class Router:
|
||||
"%s requires authorization, excluding from future updates", key
|
||||
)
|
||||
self.subscriptions.pop(key)
|
||||
except ResponseErrorException as exc:
|
||||
if exc.code != -1:
|
||||
raise
|
||||
_LOGGER.info(
|
||||
"%s apparently not supported by device, excluding from future updates",
|
||||
key,
|
||||
)
|
||||
self.subscriptions.pop(key)
|
||||
except Timeout:
|
||||
grace_left = (
|
||||
self.notify_last_attempt - time.monotonic() + NOTIFY_SUPPRESS_TIMEOUT
|
||||
|
Loading…
Reference in New Issue
Block a user