mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 07:07:28 +00:00
Fix Reolink setup when ONVIF push is unsupported (#144869)
* Fix setup when ONVIF push is not supported * fix styling
This commit is contained in:
parent
30ecba9944
commit
5acae7f86d
@ -581,7 +581,12 @@ class ReolinkHost:
|
|||||||
)
|
)
|
||||||
return
|
return
|
||||||
|
|
||||||
await self._api.subscribe(self._webhook_url)
|
try:
|
||||||
|
await self._api.subscribe(self._webhook_url)
|
||||||
|
except NotSupportedError as err:
|
||||||
|
self._onvif_push_supported = False
|
||||||
|
_LOGGER.debug(err)
|
||||||
|
return
|
||||||
|
|
||||||
_LOGGER.debug(
|
_LOGGER.debug(
|
||||||
"Host %s: subscribed successfully to webhook %s",
|
"Host %s: subscribed successfully to webhook %s",
|
||||||
@ -602,7 +607,11 @@ class ReolinkHost:
|
|||||||
return # API is shutdown, no need to subscribe
|
return # API is shutdown, no need to subscribe
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if self._onvif_push_supported and not self._api.baichuan.events_active:
|
if (
|
||||||
|
self._onvif_push_supported
|
||||||
|
and not self._api.baichuan.events_active
|
||||||
|
and self._cancel_tcp_push_check is None
|
||||||
|
):
|
||||||
await self._renew(SubType.push)
|
await self._renew(SubType.push)
|
||||||
|
|
||||||
if self._onvif_long_poll_supported and self._long_poll_task is not None:
|
if self._onvif_long_poll_supported and self._long_poll_task is not None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user