From 5876597e37d9d1752bd07a64aa4d41348e1d661c Mon Sep 17 00:00:00 2001 From: starkillerOG Date: Thu, 20 Aug 2026 23:28:13 +0200 Subject: [PATCH 1/2] Bump reolink-aio to 0.21.9 (#179625) Co-authored-by: Erwin Douna --- .../components/reolink/manifest.json | 2 +- homeassistant/components/reolink/number.py | 9 +++ requirements_all.txt | 2 +- .../reolink/snapshots/test_diagnostics.ambr | 80 +++++++++++++++---- tests/components/reolink/test_diagnostics.py | 2 + 5 files changed, 76 insertions(+), 19 deletions(-) diff --git a/homeassistant/components/reolink/manifest.json b/homeassistant/components/reolink/manifest.json index 0416a43ebd840b..1ffc8cfdb97ce9 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.8"] + "requirements": ["reolink-aio==0.21.9"] } diff --git a/homeassistant/components/reolink/number.py b/homeassistant/components/reolink/number.py index 5be6ef25bec5e3..5dcb0fcb6c1ef7 100644 --- a/homeassistant/components/reolink/number.py +++ b/homeassistant/components/reolink/number.py @@ -743,6 +743,7 @@ class ReolinkChimeNumberEntityDescription( ReolinkSmartAINumberEntityDescription( key="crossline_sensitivity", smart_type="crossline", + cmd_key="527", cmd_id=527, translation_key="crossline_sensitivity", entity_category=EntityCategory.CONFIG, @@ -761,6 +762,7 @@ class ReolinkChimeNumberEntityDescription( ReolinkSmartAINumberEntityDescription( key="intrusion_sensitivity", smart_type="intrusion", + cmd_key="529", cmd_id=529, translation_key="intrusion_sensitivity", entity_category=EntityCategory.CONFIG, @@ -779,6 +781,7 @@ class ReolinkChimeNumberEntityDescription( ReolinkSmartAINumberEntityDescription( key="linger_sensitivity", smart_type="loitering", + cmd_key="531", cmd_id=531, translation_key="linger_sensitivity", entity_category=EntityCategory.CONFIG, @@ -797,6 +800,7 @@ class ReolinkChimeNumberEntityDescription( ReolinkSmartAINumberEntityDescription( key="forgotten_item_sensitivity", smart_type="legacy", + cmd_key="549", cmd_id=549, translation_key="forgotten_item_sensitivity", entity_registry_enabled_default=False, @@ -813,6 +817,7 @@ class ReolinkChimeNumberEntityDescription( ReolinkSmartAINumberEntityDescription( key="taken_item_sensitivity", smart_type="loss", + cmd_key="551", cmd_id=551, translation_key="taken_item_sensitivity", entity_registry_enabled_default=False, @@ -829,6 +834,7 @@ class ReolinkChimeNumberEntityDescription( ReolinkSmartAINumberEntityDescription( key="intrusion_delay", smart_type="intrusion", + cmd_key="529", cmd_id=529, translation_key="intrusion_delay", entity_registry_enabled_default=False, @@ -847,6 +853,7 @@ class ReolinkChimeNumberEntityDescription( ReolinkSmartAINumberEntityDescription( key="linger_delay", smart_type="loitering", + cmd_key="531", cmd_id=531, translation_key="linger_delay", entity_registry_enabled_default=False, @@ -864,6 +871,7 @@ class ReolinkChimeNumberEntityDescription( ReolinkSmartAINumberEntityDescription( key="forgotten_item_delay", smart_type="legacy", + cmd_key="549", cmd_id=549, translation_key="forgotten_item_delay", entity_registry_enabled_default=False, @@ -882,6 +890,7 @@ class ReolinkChimeNumberEntityDescription( ReolinkSmartAINumberEntityDescription( key="taken_item_delay", smart_type="loss", + cmd_key="551", cmd_id=551, translation_key="taken_item_delay", entity_registry_enabled_default=False, diff --git a/requirements_all.txt b/requirements_all.txt index 1d40a6aa651f54..0668de64978ebf 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -2928,7 +2928,7 @@ renault-api==0.5.12 renson-endura-delta==1.7.2 # homeassistant.components.reolink -reolink-aio==0.21.8 +reolink-aio==0.21.9 # homeassistant.components.radio_frequency rf-protocols==4.3.0 diff --git a/tests/components/reolink/snapshots/test_diagnostics.ambr b/tests/components/reolink/snapshots/test_diagnostics.ambr index 77628e28f68264..48b1a55edccf1c 100644 --- a/tests/components/reolink/snapshots/test_diagnostics.ambr +++ b/tests/components/reolink/snapshots/test_diagnostics.ambr @@ -72,6 +72,10 @@ 0, ]), 'cmd list': dict({ + '115': dict({ + '0': 1, + 'null': 2, + }), '208': dict({ '0': 1, 'null': 1, @@ -84,10 +88,38 @@ '0': 1, 'null': 1, }), - '594': dict({ + '439': dict({ '0': 1, 'null': 1, }), + '483': dict({ + '0': 1, + 'null': 1, + }), + '527': dict({ + '0': 1, + 'null': 1, + }), + '529': dict({ + '0': 2, + 'null': 2, + }), + '531': dict({ + '0': 2, + 'null': 2, + }), + '549': dict({ + '0': 2, + 'null': 2, + }), + '551': dict({ + '0': 2, + 'null': 2, + }), + '594': dict({ + '0': 4, + 'null': 4, + }), '609': dict({ '0': 1, 'null': 1, @@ -101,12 +133,12 @@ 'null': 2, }), 'GetAiAlarm': dict({ - '0': 6, - 'null': 6, + '0': 12, + 'null': 12, }), 'GetAiCfg': dict({ - '0': 2, - 'null': 2, + '0': 4, + 'null': 4, }), 'GetAudioAlarm': dict({ '0': 1, @@ -125,8 +157,8 @@ 'null': 2, }), 'GetBatteryInfo': dict({ - '0': 1, - 'null': 1, + '0': 3, + 'null': 3, }), 'GetBuzzerAlarmV20': dict({ '0': 1, @@ -149,20 +181,27 @@ 'null': 2, }), 'GetEnc': dict({ - '0': 1, - 'null': 1, + '0': 7, + 'null': 7, }), 'GetFtp': dict({ '0': 1, 'null': 2, }), + 'GetHddInfo': dict({ + 'null': 1, + }), + 'GetImage': dict({ + '0': 5, + 'null': 5, + }), 'GetIrLights': dict({ '0': 1, 'null': 1, }), 'GetIsp': dict({ - '0': 1, - 'null': 1, + '0': 6, + 'null': 6, }), 'GetManualRec': dict({ '0': 1, @@ -176,10 +215,13 @@ '0': 1, 'null': 1, }), - 'GetPirInfo': dict({ - '0': 1, + 'GetPerformance': dict({ 'null': 1, }), + 'GetPirInfo': dict({ + '0': 4, + 'null': 4, + }), 'GetPowerLed': dict({ '0': 2, 'null': 2, @@ -192,13 +234,17 @@ '0': 2, 'null': 2, }), + 'GetPtzTraceSection': dict({ + '0': 2, + 'null': 2, + }), 'GetPush': dict({ '0': 1, 'null': 2, }), 'GetRec': dict({ - '0': 1, - 'null': 2, + '0': 2, + 'null': 4, }), 'GetScene': dict({ 'null': 1, @@ -207,8 +253,8 @@ 'null': 1, }), 'GetWhiteLed': dict({ - '0': 3, - 'null': 3, + '0': 7, + 'null': 7, }), 'GetZoomFocus': dict({ '0': 2, diff --git a/tests/components/reolink/test_diagnostics.py b/tests/components/reolink/test_diagnostics.py index 3e8ab4d0b2b958..07b13dda529a73 100644 --- a/tests/components/reolink/test_diagnostics.py +++ b/tests/components/reolink/test_diagnostics.py @@ -2,6 +2,7 @@ from unittest.mock import MagicMock +import pytest from reolink_aio.api import Chime from syrupy.assertion import SnapshotAssertion @@ -12,6 +13,7 @@ from tests.typing import ClientSessionGenerator +@pytest.mark.usefixtures("entity_registry_enabled_by_default", "reolink_host") async def test_entry_diagnostics( hass: HomeAssistant, hass_client: ClientSessionGenerator, From e9737b72710ddc910b7a82619adc548ee9a9116f Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Thu, 20 Aug 2026 23:29:27 +0200 Subject: [PATCH 2/2] Fix flaky google calendar coordinator tests (#179687) Co-authored-by: Claude --- tests/components/google/test_calendar.py | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/tests/components/google/test_calendar.py b/tests/components/google/test_calendar.py index b28afe71b86f89..ba7f18882897ff 100644 --- a/tests/components/google/test_calendar.py +++ b/tests/components/google/test_calendar.py @@ -388,10 +388,7 @@ async def test_update_error( with patch("homeassistant.util.utcnow", return_value=now): async_fire_time_changed(hass, now) - await hass.async_block_till_done() - # Ensure coordinator update completes - await hass.async_block_till_done() - await hass.async_block_till_done() + await hass.async_block_till_done(wait_background_tasks=True) # Entity is marked uanvailable due to API failure state = hass.states.get(TEST_ENTITY) @@ -420,10 +417,7 @@ async def test_update_error( with patch("homeassistant.util.utcnow", return_value=now): async_fire_time_changed(hass, now) - await hass.async_block_till_done() - # Ensure coordinator update completes - await hass.async_block_till_done() - await hass.async_block_till_done() + await hass.async_block_till_done(wait_background_tasks=True) # State updated with new API response state = hass.states.get(TEST_ENTITY) @@ -671,10 +665,7 @@ async def test_future_event_update_behavior( now += datetime.timedelta(minutes=60) freezer.move_to(now) async_fire_time_changed(hass, now) - await hass.async_block_till_done() - # Ensure coordinator update completes - await hass.async_block_till_done() - await hass.async_block_till_done() + await hass.async_block_till_done(wait_background_tasks=True) # Event has started state = hass.states.get(TEST_ENTITY) @@ -711,10 +702,7 @@ async def test_future_event_offset_update_behavior( now += datetime.timedelta(minutes=45) freezer.move_to(now) async_fire_time_changed(hass, now) - await hass.async_block_till_done() - # Ensure coordinator update completes - await hass.async_block_till_done() - await hass.async_block_till_done() + await hass.async_block_till_done(wait_background_tasks=True) # Event has not started, but the offset was reached state = hass.states.get(TEST_ENTITY)