From 9e1bfa3564ca169d67ef10d5b5ecf423e833b2c7 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Mon, 9 Feb 2026 09:55:58 +0100 Subject: [PATCH] Cleanup mired light test (#162622) --- tests/components/light/test_init.py | 43 ----------------------------- 1 file changed, 43 deletions(-) diff --git a/tests/components/light/test_init.py b/tests/components/light/test_init.py index 97157e4d2cf..bb145a426c2 100644 --- a/tests/components/light/test_init.py +++ b/tests/components/light/test_init.py @@ -1952,49 +1952,6 @@ async def test_light_service_call_color_temp_conversion(hass: HomeAssistant) -> assert data == {"brightness": 255, "rgbww_color": (0, 0, 0, 66, 189)} -async def test_light_mired_color_temp_conversion(hass: HomeAssistant) -> None: - """Test color temp conversion from K to legacy mired.""" - entities = [ - MockLight("Test_rgbww_ct", STATE_ON), - MockLight("Test_rgbww", STATE_ON), - ] - setup_test_component_platform(hass, light.DOMAIN, entities) - - entity0 = entities[0] - entity0.supported_color_modes = { - light.ColorMode.COLOR_TEMP, - } - entity0._attr_min_color_temp_kelvin = 1800 - entity0._attr_max_color_temp_kelvin = 6700 - - assert await async_setup_component(hass, "light", {"light": {"platform": "test"}}) - await hass.async_block_till_done() - - state = hass.states.get(entity0.entity_id) - assert state.attributes["supported_color_modes"] == [light.ColorMode.COLOR_TEMP] - assert state.attributes["min_color_temp_kelvin"] == 1800 - assert state.attributes["max_color_temp_kelvin"] == 6700 - - await hass.services.async_call( - "light", - "turn_on", - { - "entity_id": [ - entity0.entity_id, - ], - "brightness_pct": 100, - "color_temp_kelvin": 3500, - }, - blocking=True, - ) - _, data = entity0.last_call("turn_on") - assert data == {"brightness": 255, "color_temp_kelvin": 3500} - - state = hass.states.get(entity0.entity_id) - assert state.attributes["color_mode"] == light.ColorMode.COLOR_TEMP - assert state.attributes["color_temp_kelvin"] == 3500 - - async def test_light_service_call_white_mode(hass: HomeAssistant) -> None: """Test color_mode white in service calls.""" entity0 = MockLight("Test_white", STATE_ON)