mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 04:07:08 +00: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.Client import Client
|
||||||
from huawei_lte_api.Connection import Connection
|
from huawei_lte_api.Connection import Connection
|
||||||
from huawei_lte_api.exceptions import (
|
from huawei_lte_api.exceptions import (
|
||||||
|
ResponseErrorException,
|
||||||
ResponseErrorLoginRequiredException,
|
ResponseErrorLoginRequiredException,
|
||||||
ResponseErrorNotSupportedException,
|
ResponseErrorNotSupportedException,
|
||||||
)
|
)
|
||||||
@ -208,6 +209,14 @@ class Router:
|
|||||||
"%s requires authorization, excluding from future updates", key
|
"%s requires authorization, excluding from future updates", key
|
||||||
)
|
)
|
||||||
self.subscriptions.pop(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:
|
except Timeout:
|
||||||
grace_left = (
|
grace_left = (
|
||||||
self.notify_last_attempt - time.monotonic() + NOTIFY_SUPPRESS_TIMEOUT
|
self.notify_last_attempt - time.monotonic() + NOTIFY_SUPPRESS_TIMEOUT
|
||||||
|
Loading…
x
Reference in New Issue
Block a user