mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 23:57:06 +00:00
Bump reolink-aio to 0.14.3 (#149191)
This commit is contained in:
parent
3bd70a4698
commit
7d895653fb
@ -42,7 +42,7 @@ async def async_get_config_entry_diagnostics(
|
|||||||
"Baichuan port": api.baichuan.port,
|
"Baichuan port": api.baichuan.port,
|
||||||
"Baichuan only": api.baichuan_only,
|
"Baichuan only": api.baichuan_only,
|
||||||
"WiFi connection": api.wifi_connection,
|
"WiFi connection": api.wifi_connection,
|
||||||
"WiFi signal": api.wifi_signal,
|
"WiFi signal": api.wifi_signal(),
|
||||||
"RTMP enabled": api.rtmp_enabled,
|
"RTMP enabled": api.rtmp_enabled,
|
||||||
"RTSP enabled": api.rtsp_enabled,
|
"RTSP enabled": api.rtsp_enabled,
|
||||||
"ONVIF enabled": api.onvif_enabled,
|
"ONVIF enabled": api.onvif_enabled,
|
||||||
|
@ -167,7 +167,7 @@ class ReolinkChannelCoordinatorEntity(ReolinkHostCoordinatorEntity):
|
|||||||
super().__init__(reolink_data, coordinator)
|
super().__init__(reolink_data, coordinator)
|
||||||
|
|
||||||
self._channel = channel
|
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}"
|
self._attr_unique_id = f"{self._host.unique_id}_{self._host.api.camera_uid(channel)}_{self.entity_description.key}"
|
||||||
else:
|
else:
|
||||||
self._attr_unique_id = (
|
self._attr_unique_id = (
|
||||||
|
@ -19,5 +19,5 @@
|
|||||||
"iot_class": "local_push",
|
"iot_class": "local_push",
|
||||||
"loggers": ["reolink_aio"],
|
"loggers": ["reolink_aio"],
|
||||||
"quality_scale": "platinum",
|
"quality_scale": "platinum",
|
||||||
"requirements": ["reolink-aio==0.14.2"]
|
"requirements": ["reolink-aio==0.14.3"]
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,12 @@ from homeassistant.components.sensor import (
|
|||||||
SensorEntityDescription,
|
SensorEntityDescription,
|
||||||
SensorStateClass,
|
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.core import HomeAssistant
|
||||||
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
|
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
|
||||||
from homeassistant.helpers.typing import StateType
|
from homeassistant.helpers.typing import StateType
|
||||||
@ -123,12 +128,14 @@ SENSORS = (
|
|||||||
HOST_SENSORS = (
|
HOST_SENSORS = (
|
||||||
ReolinkHostSensorEntityDescription(
|
ReolinkHostSensorEntityDescription(
|
||||||
key="wifi_signal",
|
key="wifi_signal",
|
||||||
cmd_key="GetWifiSignal",
|
cmd_key="115",
|
||||||
translation_key="wifi_signal",
|
translation_key="wifi_signal",
|
||||||
|
device_class=SensorDeviceClass.SIGNAL_STRENGTH,
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
|
native_unit_of_measurement=SIGNAL_STRENGTH_DECIBELS_MILLIWATT,
|
||||||
entity_registry_enabled_default=False,
|
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,
|
supported=lambda api: api.supported(None, "wifi") and api.wifi_connection,
|
||||||
),
|
),
|
||||||
ReolinkHostSensorEntityDescription(
|
ReolinkHostSensorEntityDescription(
|
||||||
|
2
requirements_all.txt
generated
2
requirements_all.txt
generated
@ -2663,7 +2663,7 @@ renault-api==0.3.1
|
|||||||
renson-endura-delta==1.7.2
|
renson-endura-delta==1.7.2
|
||||||
|
|
||||||
# homeassistant.components.reolink
|
# homeassistant.components.reolink
|
||||||
reolink-aio==0.14.2
|
reolink-aio==0.14.3
|
||||||
|
|
||||||
# homeassistant.components.idteck_prox
|
# homeassistant.components.idteck_prox
|
||||||
rfk101py==0.0.1
|
rfk101py==0.0.1
|
||||||
|
2
requirements_test_all.txt
generated
2
requirements_test_all.txt
generated
@ -2209,7 +2209,7 @@ renault-api==0.3.1
|
|||||||
renson-endura-delta==1.7.2
|
renson-endura-delta==1.7.2
|
||||||
|
|
||||||
# homeassistant.components.reolink
|
# homeassistant.components.reolink
|
||||||
reolink-aio==0.14.2
|
reolink-aio==0.14.3
|
||||||
|
|
||||||
# homeassistant.components.rflink
|
# homeassistant.components.rflink
|
||||||
rflink==0.0.67
|
rflink==0.0.67
|
||||||
|
@ -123,7 +123,7 @@ def _init_host_mock(host_mock: MagicMock) -> None:
|
|||||||
host_mock.timeout = 60
|
host_mock.timeout = 60
|
||||||
host_mock.renewtimer.return_value = 600
|
host_mock.renewtimer.return_value = 600
|
||||||
host_mock.wifi_connection = False
|
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.whiteled_mode_list.return_value = []
|
||||||
host_mock.zoom_range.return_value = {
|
host_mock.zoom_range.return_value = {
|
||||||
"zoom": {"pos": {"min": 0, "max": 100}},
|
"zoom": {"pos": {"min": 0, "max": 100}},
|
||||||
|
@ -284,6 +284,7 @@ async def test_browsing_h265_encoding(
|
|||||||
) -> None:
|
) -> None:
|
||||||
"""Test browsing a Reolink camera with h265 stream encoding."""
|
"""Test browsing a Reolink camera with h265 stream encoding."""
|
||||||
entry_id = config_entry.entry_id
|
entry_id = config_entry.entry_id
|
||||||
|
reolink_connect.is_nvr = True
|
||||||
|
|
||||||
with patch("homeassistant.components.reolink.PLATFORMS", [Platform.CAMERA]):
|
with patch("homeassistant.components.reolink.PLATFORMS", [Platform.CAMERA]):
|
||||||
assert await hass.config_entries.async_setup(entry_id) is True
|
assert await hass.config_entries.async_setup(entry_id) is True
|
||||||
|
@ -22,7 +22,7 @@ async def test_sensors(
|
|||||||
"""Test sensor entities."""
|
"""Test sensor entities."""
|
||||||
reolink_connect.ptz_pan_position.return_value = 1200
|
reolink_connect.ptz_pan_position.return_value = 1200
|
||||||
reolink_connect.wifi_connection = True
|
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_list = [0]
|
||||||
reolink_connect.hdd_storage.return_value = 95
|
reolink_connect.hdd_storage.return_value = 95
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user