mirror of
https://github.com/home-assistant/core.git
synced 2025-08-01 03:35:09 +02:00
Adjust light test helpers to use Kelvin, and cleanup unused helpers (#133048)
Cleanup light test helper methods
This commit is contained in:
@@ -205,7 +205,9 @@ async def test_single_color_mode(
|
||||
state = hass.states.get("light.test")
|
||||
assert state.state == STATE_UNKNOWN
|
||||
|
||||
await common.async_turn_on(hass, "light.test", brightness=50, color_temp=192)
|
||||
await common.async_turn_on(
|
||||
hass, "light.test", brightness=50, color_temp_kelvin=5208
|
||||
)
|
||||
async_fire_mqtt_message(hass, "test_light", "on,50,192")
|
||||
color_modes = [light.ColorMode.COLOR_TEMP]
|
||||
state = hass.states.get("light.test")
|
||||
@@ -463,7 +465,7 @@ async def test_sending_mqtt_commands_and_optimistic(
|
||||
assert state.state == STATE_ON
|
||||
|
||||
# Set color_temp
|
||||
await common.async_turn_on(hass, "light.test", color_temp=70)
|
||||
await common.async_turn_on(hass, "light.test", color_temp_kelvin=14285)
|
||||
mqtt_mock.async_publish.assert_called_once_with(
|
||||
"test_light_rgb/set", "on,,70,--,-", 2, False
|
||||
)
|
||||
@@ -594,7 +596,7 @@ async def test_sending_mqtt_commands_non_optimistic_brightness_template(
|
||||
assert state.state == STATE_UNKNOWN
|
||||
|
||||
# Set color_temp
|
||||
await common.async_turn_on(hass, "light.test", color_temp=70)
|
||||
await common.async_turn_on(hass, "light.test", color_temp_kelvin=14285)
|
||||
mqtt_mock.async_publish.assert_called_once_with(
|
||||
"test_light_rgb/set", "on,,70,--,-", 0, False
|
||||
)
|
||||
|
Reference in New Issue
Block a user