Improve WLED pure white support for RGBW (#30477)

This commit is contained in:
Franck Nijhof
2020-01-04 22:52:10 +01:00
committed by Paulus Schoutsen
parent 51db9bdfce
commit 4e62da9c8e
2 changed files with 22 additions and 0 deletions
+17
View File
@@ -193,3 +193,20 @@ async def test_rgbw_light(
assert state.state == STATE_ON
assert state.attributes.get(ATTR_HS_COLOR) == (28.874, 72.522)
assert state.attributes.get(ATTR_WHITE_VALUE) == 100
await hass.services.async_call(
LIGHT_DOMAIN,
SERVICE_TURN_ON,
{
ATTR_ENTITY_ID: "light.wled_rgbw_light",
ATTR_RGB_COLOR: (255, 255, 255),
ATTR_WHITE_VALUE: 100,
},
blocking=True,
)
await hass.async_block_till_done()
state = hass.states.get("light.wled_rgbw_light")
assert state.state == STATE_ON
assert state.attributes.get(ATTR_HS_COLOR) == (0, 0)
assert state.attributes.get(ATTR_WHITE_VALUE) == 100