From 0ce69a58a38819057d8a2c09be48252fcff4898d Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Sun, 6 Sep 2026 10:44:05 -0700 Subject: [PATCH] Ignore independent profile event order in test --- tests/test_switch.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_switch.py b/tests/test_switch.py index 733b1ef3..cfebc4f6 100644 --- a/tests/test_switch.py +++ b/tests/test_switch.py @@ -1891,9 +1891,10 @@ async def test_shared_profiles_track_manual_brightness( hass.states.get(ENTITY_LIGHT_1).attributes[ATTR_BRIGHTNESS] == expected_brightness ) - assert [event.data[SWITCH_DOMAIN] for event in events] == [ + # Independent profiles may publish their events in either order. + assert sorted(event.data[SWITCH_DOMAIN] for event in events) == sorted( profiles[name].entity_id for name in event_profiles - ] + ) assert all(event.context == context for event in events) assert all( event.data[CONF_MANUAL_CONTROL] == LightControlAttributes.BRIGHTNESS