From 6c1b44aae2698ed723dcb1c5855d274f5a0ffc57 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Fri, 23 Jan 2026 21:28:41 +0100 Subject: [PATCH] Improve docstrings in condition tests (#161431) --- tests/components/fan/test_condition.py | 6 +++++- tests/components/light/test_condition.py | 6 +++++- tests/components/siren/test_condition.py | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/tests/components/fan/test_condition.py b/tests/components/fan/test_condition.py index 31c46f2fa70..9af0e822021 100644 --- a/tests/components/fan/test_condition.py +++ b/tests/components/fan/test_condition.py @@ -27,7 +27,11 @@ async def target_fans(hass: HomeAssistant) -> list[str]: @pytest.fixture async def target_switches(hass: HomeAssistant) -> list[str]: - """Create multiple switch entities associated with different targets.""" + """Create multiple switch entities associated with different targets. + + Note: The switches are used to ensure that only fan entities are considered + in the condition evaluation and not other toggle entities. + """ return (await target_entities(hass, "switch"))["included"] diff --git a/tests/components/light/test_condition.py b/tests/components/light/test_condition.py index 53725df75c0..659481e9a70 100644 --- a/tests/components/light/test_condition.py +++ b/tests/components/light/test_condition.py @@ -27,7 +27,11 @@ async def target_lights(hass: HomeAssistant) -> list[str]: @pytest.fixture async def target_switches(hass: HomeAssistant) -> list[str]: - """Create multiple switch entities associated with different targets.""" + """Create multiple switch entities associated with different targets. + + Note: The switches are used to ensure that only light entities are considered + in the condition evaluation and not other toggle entities. + """ return (await target_entities(hass, "switch"))["included"] diff --git a/tests/components/siren/test_condition.py b/tests/components/siren/test_condition.py index c1c66d5e9d4..6562c91798e 100644 --- a/tests/components/siren/test_condition.py +++ b/tests/components/siren/test_condition.py @@ -27,7 +27,11 @@ async def target_sirens(hass: HomeAssistant) -> list[str]: @pytest.fixture async def target_switches(hass: HomeAssistant) -> list[str]: - """Create multiple switch entities associated with different targets.""" + """Create multiple switch entities associated with different targets. + + Note: The switches are used to ensure that only siren entities are considered + in the condition evaluation and not other toggle entities. + """ return (await target_entities(hass, "switch"))["included"]