mirror of
https://github.com/home-assistant/core.git
synced 2025-11-13 21:10:25 +00:00
Change light white service call attribute to accept True (#89803)
This commit is contained in:
@@ -2159,6 +2159,26 @@ async def test_light_service_call_white_mode(
|
||||
_, data = entity0.last_call("turn_off")
|
||||
assert data == {}
|
||||
|
||||
entity0.calls = []
|
||||
await hass.services.async_call(
|
||||
"light",
|
||||
"turn_on",
|
||||
{"entity_id": [entity0.entity_id], "white": True},
|
||||
blocking=True,
|
||||
)
|
||||
_, data = entity0.last_call("turn_on")
|
||||
assert data == {"white": 100}
|
||||
|
||||
entity0.calls = []
|
||||
await hass.services.async_call(
|
||||
"light",
|
||||
"turn_on",
|
||||
{"entity_id": [entity0.entity_id], "brightness_pct": 50, "white": True},
|
||||
blocking=True,
|
||||
)
|
||||
_, data = entity0.last_call("turn_on")
|
||||
assert data == {"white": 128}
|
||||
|
||||
|
||||
async def test_light_state_color_conversion(
|
||||
hass: HomeAssistant, enable_custom_integrations: None
|
||||
|
||||
Reference in New Issue
Block a user