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"})