mirror of
https://github.com/home-assistant/core.git
synced 2025-08-01 03:35:09 +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:
@@ -432,7 +432,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,))
|
||||
@@ -443,7 +443,7 @@ async def test_sending_mqtt_commands_and_optimistic(
|
||||
assert state.state == STATE_ON
|
||||
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
|
||||
assert state.attributes.get(ATTR_ASSUMED_STATE)
|
||||
|
||||
await common.async_turn_off(hass, "light.test")
|
||||
|
Reference in New Issue
Block a user