Adapt group to color temperature in K (#79719)

* Adapt group to color temperature in K

* Adjust tests

* Adjust tests
This commit is contained in:
Erik Montnemery 2022-10-10 14:57:22 +02:00 committed by GitHub
parent 1e5908d3a8
commit 2ee6ea9877
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 41 additions and 38 deletions

View file

@ -1193,7 +1193,7 @@ async def test_light_backwards_compatibility_color_mode(
entity2 = platform.ENTITIES[2]
entity2.supported_features = light.SUPPORT_BRIGHTNESS | light.SUPPORT_COLOR_TEMP
entity2.color_temp = 100
entity2.color_temp_kelvin = 10000
entity3 = platform.ENTITIES[3]
entity3.supported_features = light.SUPPORT_BRIGHTNESS | light.SUPPORT_COLOR
@ -1204,7 +1204,7 @@ async def test_light_backwards_compatibility_color_mode(
light.SUPPORT_BRIGHTNESS | light.SUPPORT_COLOR | light.SUPPORT_COLOR_TEMP
)
entity4.hs_color = (240, 100)
entity4.color_temp = 100
entity4.color_temp_kelvin = 10000
assert await async_setup_component(hass, "light", {"light": {"platform": "test"}})
await hass.async_block_till_done()
@ -1893,7 +1893,7 @@ async def test_light_service_call_color_temp_conversion(
assert entity1.min_mireds == 153
assert entity1.max_mireds == 500
assert entity1.min_color_temp_kelvin == 2000
assert entity1.max_color_temp_kelvin == 6535
assert entity1.max_color_temp_kelvin == 6500
assert await async_setup_component(hass, "light", {"light": {"platform": "test"}})
await hass.async_block_till_done()