Bump reolink-aio to 0.2.3 (#85871)

This commit is contained in:
starkillerOG 2023-01-15 13:07:15 +01:00 committed by GitHub
parent 314576048d
commit 476de319ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 8 additions and 5 deletions

View File

@ -31,6 +31,9 @@ async def async_setup_entry(
streams.append("ext") streams.append("ext")
for stream in streams: for stream in streams:
stream_url = await host.api.get_stream_source(channel, stream)
if stream_url is None and stream != "snapshots":
continue
cameras.append(ReolinkCamera(reolink_data, config_entry, channel, stream)) cameras.append(ReolinkCamera(reolink_data, config_entry, channel, stream))
async_add_entities(cameras, update_before_add=True) async_add_entities(cameras, update_before_add=True)

View File

@ -128,7 +128,7 @@ class ReolinkHost:
async def disconnect(self): async def disconnect(self):
"""Disconnect from the API, so the connection will be released.""" """Disconnect from the API, so the connection will be released."""
await self._api.unsubscribe_all() await self._api.unsubscribe()
try: try:
await self._api.logout() await self._api.logout()

View File

@ -3,7 +3,7 @@
"name": "Reolink IP NVR/camera", "name": "Reolink IP NVR/camera",
"config_flow": true, "config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/reolink", "documentation": "https://www.home-assistant.io/integrations/reolink",
"requirements": ["reolink-aio==0.2.2"], "requirements": ["reolink-aio==0.2.3"],
"codeowners": ["@starkillerOG"], "codeowners": ["@starkillerOG"],
"iot_class": "local_polling", "iot_class": "local_polling",
"loggers": ["reolink_aio"] "loggers": ["reolink_aio"]

View File

@ -2212,7 +2212,7 @@ regenmaschine==2022.11.0
renault-api==0.1.11 renault-api==0.1.11
# homeassistant.components.reolink # homeassistant.components.reolink
reolink-aio==0.2.2 reolink-aio==0.2.3
# homeassistant.components.python_script # homeassistant.components.python_script
restrictedpython==6.0 restrictedpython==6.0

View File

@ -1557,7 +1557,7 @@ regenmaschine==2022.11.0
renault-api==0.1.11 renault-api==0.1.11
# homeassistant.components.reolink # homeassistant.components.reolink
reolink-aio==0.2.2 reolink-aio==0.2.3
# homeassistant.components.python_script # homeassistant.components.python_script
restrictedpython==6.0 restrictedpython==6.0

View File

@ -31,7 +31,7 @@ def get_mock_info(error=None, user_level="admin"):
host_mock.get_host_data = AsyncMock(return_value=None) host_mock.get_host_data = AsyncMock(return_value=None)
else: else:
host_mock.get_host_data = AsyncMock(side_effect=error) host_mock.get_host_data = AsyncMock(side_effect=error)
host_mock.unsubscribe_all = AsyncMock(return_value=True) host_mock.unsubscribe = AsyncMock(return_value=True)
host_mock.logout = AsyncMock(return_value=True) host_mock.logout = AsyncMock(return_value=True)
host_mock.mac_address = TEST_MAC host_mock.mac_address = TEST_MAC
host_mock.onvif_enabled = True host_mock.onvif_enabled = True