mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 02:07:09 +00:00
Migrate esphome light tests to use Kelvin (#133008)
This commit is contained in:
parent
6d042d987f
commit
37f2bde6f5
@ -20,9 +20,7 @@ from homeassistant.components.light import (
|
||||
ATTR_FLASH,
|
||||
ATTR_HS_COLOR,
|
||||
ATTR_MAX_COLOR_TEMP_KELVIN,
|
||||
ATTR_MAX_MIREDS,
|
||||
ATTR_MIN_COLOR_TEMP_KELVIN,
|
||||
ATTR_MIN_MIREDS,
|
||||
ATTR_RGB_COLOR,
|
||||
ATTR_RGBW_COLOR,
|
||||
ATTR_RGBWW_COLOR,
|
||||
@ -1379,9 +1377,6 @@ async def test_light_color_temp(
|
||||
assert state.state == STATE_ON
|
||||
attributes = state.attributes
|
||||
|
||||
assert attributes[ATTR_MIN_MIREDS] == 153
|
||||
assert attributes[ATTR_MAX_MIREDS] == 370
|
||||
|
||||
assert attributes[ATTR_MIN_COLOR_TEMP_KELVIN] == 2700
|
||||
assert attributes[ATTR_MAX_COLOR_TEMP_KELVIN] == 6500
|
||||
await hass.services.async_call(
|
||||
@ -1454,9 +1449,6 @@ async def test_light_color_temp_no_mireds_set(
|
||||
assert state.state == STATE_ON
|
||||
attributes = state.attributes
|
||||
|
||||
assert attributes[ATTR_MIN_MIREDS] is None
|
||||
assert attributes[ATTR_MAX_MIREDS] is None
|
||||
|
||||
assert attributes[ATTR_MIN_COLOR_TEMP_KELVIN] == 0
|
||||
assert attributes[ATTR_MAX_COLOR_TEMP_KELVIN] == 0
|
||||
await hass.services.async_call(
|
||||
@ -1558,8 +1550,6 @@ async def test_light_color_temp_legacy(
|
||||
|
||||
assert attributes[ATTR_COLOR_MODE] == ColorMode.COLOR_TEMP
|
||||
assert attributes[ATTR_SUPPORTED_COLOR_MODES] == [ColorMode.COLOR_TEMP]
|
||||
assert attributes[ATTR_MIN_MIREDS] == 153
|
||||
assert attributes[ATTR_MAX_MIREDS] == 370
|
||||
|
||||
assert attributes[ATTR_MIN_COLOR_TEMP_KELVIN] == 2700
|
||||
assert attributes[ATTR_MAX_COLOR_TEMP_KELVIN] == 6500
|
||||
|
Loading…
x
Reference in New Issue
Block a user