From 437f44e1997996d7bf835494558c5f63186c1673 Mon Sep 17 00:00:00 2001 From: starkillerOG Date: Thu, 17 Sep 2026 14:25:49 +0200 Subject: [PATCH] Bump reolink_aio to 0.21.17 (#182472) --- homeassistant/components/reolink/camera.py | 4 ++-- homeassistant/components/reolink/manifest.json | 2 +- homeassistant/components/reolink/number.py | 8 ++++---- homeassistant/components/reolink/strings.json | 1 + requirements_all.txt | 2 +- tests/components/reolink/conftest.py | 2 ++ 6 files changed, 11 insertions(+), 8 deletions(-) diff --git a/homeassistant/components/reolink/camera.py b/homeassistant/components/reolink/camera.py index 93f7f72b14f0..dd9ad0ea7548 100644 --- a/homeassistant/components/reolink/camera.py +++ b/homeassistant/components/reolink/camera.py @@ -83,14 +83,14 @@ CAMERA_ENTITIES = ( key="autotrack_snapshots_sub", stream="autotrack_snapshots_sub", translation_key="telephoto_snapshots_sub", - supported=lambda api, ch: api.supported(ch, "autotrack_stream"), + supported=lambda api, ch: api.supported(ch, "autotrack_snapshot"), entity_registry_enabled_default=False, ), ReolinkCameraEntityDescription( key="autotrack_snapshots_main", stream="autotrack_snapshots_main", translation_key="telephoto_snapshots_main", - supported=lambda api, ch: api.supported(ch, "autotrack_stream"), + supported=lambda api, ch: api.supported(ch, "autotrack_snapshot"), entity_registry_enabled_default=False, ), ) diff --git a/homeassistant/components/reolink/manifest.json b/homeassistant/components/reolink/manifest.json index d31620d0e526..c6ec0e7f5fb4 100644 --- a/homeassistant/components/reolink/manifest.json +++ b/homeassistant/components/reolink/manifest.json @@ -20,5 +20,5 @@ "iot_class": "local_push", "loggers": ["reolink_aio"], "quality_scale": "platinum", - "requirements": ["reolink-aio==0.21.16"] + "requirements": ["reolink-aio==0.21.17"] } diff --git a/homeassistant/components/reolink/number.py b/homeassistant/components/reolink/number.py index f309e283edd5..a12c95d1445d 100644 --- a/homeassistant/components/reolink/number.py +++ b/homeassistant/components/reolink/number.py @@ -165,8 +165,8 @@ NUMBER_ENTITIES = ( entity_registry_enabled_default=False, native_step=1, native_unit_of_measurement=UnitOfTime.SECONDS, - native_min_value=30, - native_max_value=900, + get_min_value=lambda api, ch: api.whiteled_event_on_time_range(ch)[0], + get_max_value=lambda api, ch: api.whiteled_event_on_time_range(ch)[1], supported=lambda api, ch: api.supported(ch, "floodlight_event"), value=lambda api, ch: api.whiteled_event_on_time(ch), method=lambda api, ch, value: api.baichuan.set_floodlight( @@ -183,8 +183,8 @@ NUMBER_ENTITIES = ( entity_registry_enabled_default=False, native_step=1, native_unit_of_measurement=UnitOfTime.SECONDS, - native_min_value=10, - native_max_value=30, + get_min_value=lambda api, ch: api.whiteled_event_flash_time_range(ch)[0], + get_max_value=lambda api, ch: api.whiteled_event_flash_time_range(ch)[1], supported=lambda api, ch: api.supported(ch, "floodlight_event"), value=lambda api, ch: api.whiteled_event_flash_time(ch), method=lambda api, ch, value: api.baichuan.set_floodlight( diff --git a/homeassistant/components/reolink/strings.json b/homeassistant/components/reolink/strings.json index 34ceb130877f..1fcb860f906a 100644 --- a/homeassistant/components/reolink/strings.json +++ b/homeassistant/components/reolink/strings.json @@ -553,6 +553,7 @@ "state": { "adaptive": "Adaptive", "auto": "[%key:common::state::auto%]", + "auto_pir": "Auto PIR", "autoadaptive": "Auto adaptive", "off": "[%key:common::state::off%]", "onatnight": "On at night", diff --git a/requirements_all.txt b/requirements_all.txt index 936d8cb728aa..a73f3adccb79 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -2989,7 +2989,7 @@ renault-api==0.5.13 renson-endura-delta==1.7.2 # homeassistant.components.reolink -reolink-aio==0.21.16 +reolink-aio==0.21.17 # homeassistant.components.radio_frequency rf-protocols==4.3.0 diff --git a/tests/components/reolink/conftest.py b/tests/components/reolink/conftest.py index 8e43a077a7e2..c89d88af257e 100644 --- a/tests/components/reolink/conftest.py +++ b/tests/components/reolink/conftest.py @@ -182,6 +182,8 @@ def _init_host_mock(host_mock: MagicMock) -> None: "zoom": {"min": 0, "max": 100}, "focus": {"min": 0, "max": 100}, } + host_mock.whiteled_event_on_time_range.return_value = (30, 900) + host_mock.whiteled_event_flash_time_range.return_value = (10, 30) host_mock.capabilities = {"Host": ["RTSP"], "0": ["motion_detection"]} host_mock.checked_api_versions = {"GetEvents": 1} host_mock.abilities = {"abilityChn": [{"aiTrack": {"permit": 0, "ver": 0}}]}