Bump reolink-aio to 0.14.3 (#149191)

This commit is contained in:
starkillerOG 2025-07-21 18:19:56 +02:00 committed by GitHub
parent 3bd70a4698
commit 7d895653fb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 18 additions and 10 deletions

View File

@ -42,7 +42,7 @@ async def async_get_config_entry_diagnostics(
"Baichuan port": api.baichuan.port,
"Baichuan only": api.baichuan_only,
"WiFi connection": api.wifi_connection,
"WiFi signal": api.wifi_signal,
"WiFi signal": api.wifi_signal(),
"RTMP enabled": api.rtmp_enabled,
"RTSP enabled": api.rtsp_enabled,
"ONVIF enabled": api.onvif_enabled,

View File

@ -167,7 +167,7 @@ class ReolinkChannelCoordinatorEntity(ReolinkHostCoordinatorEntity):
super().__init__(reolink_data, coordinator)
self._channel = channel
if self._host.api.supported(channel, "UID"):
if self._host.api.is_nvr and self._host.api.supported(channel, "UID"):
self._attr_unique_id = f"{self._host.unique_id}_{self._host.api.camera_uid(channel)}_{self.entity_description.key}"
else:
self._attr_unique_id = (

View File

@ -19,5 +19,5 @@
"iot_class": "local_push",
"loggers": ["reolink_aio"],
"quality_scale": "platinum",
"requirements": ["reolink-aio==0.14.2"]
"requirements": ["reolink-aio==0.14.3"]
}

View File

@ -16,7 +16,12 @@ from homeassistant.components.sensor import (
SensorEntityDescription,
SensorStateClass,
)
from homeassistant.const import PERCENTAGE, EntityCategory, UnitOfTemperature
from homeassistant.const import (
PERCENTAGE,
SIGNAL_STRENGTH_DECIBELS_MILLIWATT,
EntityCategory,
UnitOfTemperature,
)
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from homeassistant.helpers.typing import StateType
@ -123,12 +128,14 @@ SENSORS = (
HOST_SENSORS = (
ReolinkHostSensorEntityDescription(
key="wifi_signal",
cmd_key="GetWifiSignal",
cmd_key="115",
translation_key="wifi_signal",
device_class=SensorDeviceClass.SIGNAL_STRENGTH,
state_class=SensorStateClass.MEASUREMENT,
entity_category=EntityCategory.DIAGNOSTIC,
native_unit_of_measurement=SIGNAL_STRENGTH_DECIBELS_MILLIWATT,
entity_registry_enabled_default=False,
value=lambda api: api.wifi_signal,
value=lambda api: api.wifi_signal(),
supported=lambda api: api.supported(None, "wifi") and api.wifi_connection,
),
ReolinkHostSensorEntityDescription(

2
requirements_all.txt generated
View File

@ -2663,7 +2663,7 @@ renault-api==0.3.1
renson-endura-delta==1.7.2
# homeassistant.components.reolink
reolink-aio==0.14.2
reolink-aio==0.14.3
# homeassistant.components.idteck_prox
rfk101py==0.0.1

View File

@ -2209,7 +2209,7 @@ renault-api==0.3.1
renson-endura-delta==1.7.2
# homeassistant.components.reolink
reolink-aio==0.14.2
reolink-aio==0.14.3
# homeassistant.components.rflink
rflink==0.0.67

View File

@ -123,7 +123,7 @@ def _init_host_mock(host_mock: MagicMock) -> None:
host_mock.timeout = 60
host_mock.renewtimer.return_value = 600
host_mock.wifi_connection = False
host_mock.wifi_signal = None
host_mock.wifi_signal.return_value = None
host_mock.whiteled_mode_list.return_value = []
host_mock.zoom_range.return_value = {
"zoom": {"pos": {"min": 0, "max": 100}},

View File

@ -284,6 +284,7 @@ async def test_browsing_h265_encoding(
) -> None:
"""Test browsing a Reolink camera with h265 stream encoding."""
entry_id = config_entry.entry_id
reolink_connect.is_nvr = True
with patch("homeassistant.components.reolink.PLATFORMS", [Platform.CAMERA]):
assert await hass.config_entries.async_setup(entry_id) is True

View File

@ -22,7 +22,7 @@ async def test_sensors(
"""Test sensor entities."""
reolink_connect.ptz_pan_position.return_value = 1200
reolink_connect.wifi_connection = True
reolink_connect.wifi_signal = 3
reolink_connect.wifi_signal.return_value = 3
reolink_connect.hdd_list = [0]
reolink_connect.hdd_storage.return_value = 95