mirror of
https://github.com/home-assistant/core.git
synced 2025-07-30 02:38:10 +02:00
Migrate mqtt lights to use Kelvin (#132828)
* Migrate mqtt lights to use Kelvin * Adjust restore_cache tests * Adjust tests
This commit is contained in:
@ -1053,7 +1053,7 @@ async def test_sending_mqtt_commands_and_optimistic(
|
||||
"brightness": 95,
|
||||
"hs_color": [100, 100],
|
||||
"effect": "random",
|
||||
"color_temp": 100,
|
||||
"color_temp_kelvin": 10000,
|
||||
},
|
||||
)
|
||||
mock_restore_cache(hass, (fake_state,))
|
||||
@ -1065,7 +1065,7 @@ async def test_sending_mqtt_commands_and_optimistic(
|
||||
assert state.attributes.get("brightness") == 95
|
||||
assert state.attributes.get("hs_color") == (100, 100)
|
||||
assert state.attributes.get("effect") == "random"
|
||||
assert state.attributes.get("color_temp") is None # hs_color has priority
|
||||
assert state.attributes.get("color_temp_kelvin") is None # hs_color has priority
|
||||
color_modes = [light.ColorMode.COLOR_TEMP, light.ColorMode.HS]
|
||||
assert state.attributes.get(light.ATTR_SUPPORTED_COLOR_MODES) == color_modes
|
||||
expected_features = (
|
||||
@ -1205,7 +1205,7 @@ async def test_sending_mqtt_commands_and_optimistic2(
|
||||
"on",
|
||||
{
|
||||
"brightness": 95,
|
||||
"color_temp": 100,
|
||||
"color_temp_kelvin": 10000,
|
||||
"color_mode": "rgb",
|
||||
"effect": "random",
|
||||
"hs_color": [100, 100],
|
||||
|
Reference in New Issue
Block a user