From 5d104d40e0bc0f7a7b8a04d46b52372b58f1a6d7 Mon Sep 17 00:00:00 2001 From: abmantis Date: Wed, 23 Jul 2025 14:43:12 +0100 Subject: [PATCH] Update service tests --- tests/helpers/test_service.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/helpers/test_service.py b/tests/helpers/test_service.py index 8f094536988..97dfdf658a6 100644 --- a/tests/helpers/test_service.py +++ b/tests/helpers/test_service.py @@ -358,6 +358,13 @@ def label_mock(hass: HomeAssistant) -> None: labels={"my-label"}, entity_category=EntityCategory.CONFIG, ) + diag_entity_with_my_label = RegistryEntryWithDefaults( + entity_id="light.diag_with_my_label", + unique_id="diag_with_my_label", + platform="test", + labels={"my-label"}, + entity_category=EntityCategory.DIAGNOSTIC, + ) entity_with_label1_from_device = RegistryEntryWithDefaults( entity_id="light.with_label1_from_device", unique_id="with_label1_from_device", @@ -395,6 +402,7 @@ def label_mock(hass: HomeAssistant) -> None: hass, { config_entity_with_my_label.entity_id: config_entity_with_my_label, + diag_entity_with_my_label.entity_id: diag_entity_with_my_label, entity_with_label1_and_label2_from_device.entity_id: entity_with_label1_and_label2_from_device, entity_with_label1_from_device.entity_id: entity_with_label1_from_device, entity_with_label1_from_device_and_different_area.entity_id: entity_with_label1_from_device_and_different_area, @@ -778,6 +786,8 @@ async def test_extract_entity_ids_from_labels(hass: HomeAssistant) -> None: assert { "light.with_my_label", + "light.config_with_my_label", + "light.diag_with_my_label", } == await service.async_extract_entity_ids(hass, call) call = ServiceCall(hass, "light", "turn_on", {"label_id": "label1"})