From 28f0fe8c5865a2d91e65e0adaccbfe8a0460ff61 Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Sun, 6 Sep 2026 10:58:20 +0200 Subject: [PATCH] test: keep split-command brightness checks deterministic (#1532) --- tests/test_switch.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/test_switch.py b/tests/test_switch.py index 52b1dd27..aa70332c 100644 --- a/tests/test_switch.py +++ b/tests/test_switch.py @@ -1815,7 +1815,12 @@ async def test_separate_turn_on_commands(hass, separate_turn_on_commands): """Test 'separate_turn_on_commands' argument.""" switch, (light, *_) = await setup_lights_and_switch( hass, - {CONF_SEPARATE_TURN_ON_COMMANDS: separate_turn_on_commands}, + { + CONF_SEPARATE_TURN_ON_COMMANDS: separate_turn_on_commands, + # Keep normal brightness distinct from sleep mode at any time of day. + CONF_MIN_BRIGHTNESS: 50, + CONF_MAX_BRIGHTNESS: 50, + }, ) # We just turn sleep mode on and off which should change the # brightness and color. We don't test whether the number are exactly