mirror of
https://github.com/home-assistant/core.git
synced 2025-12-23 20:39:01 +00:00
Upgrade black to 20.8b1 (#39287)
This commit is contained in:
@@ -589,28 +589,40 @@ async def test_light_brightness_pct_conversion(hass):
|
||||
assert state.attributes["brightness"] == 100
|
||||
|
||||
await hass.services.async_call(
|
||||
"light", "turn_on", {"entity_id": entity.entity_id, "brightness_pct": 1}, True,
|
||||
"light",
|
||||
"turn_on",
|
||||
{"entity_id": entity.entity_id, "brightness_pct": 1},
|
||||
True,
|
||||
)
|
||||
|
||||
_, data = entity.last_call("turn_on")
|
||||
assert data["brightness"] == 3, data
|
||||
|
||||
await hass.services.async_call(
|
||||
"light", "turn_on", {"entity_id": entity.entity_id, "brightness_pct": 2}, True,
|
||||
"light",
|
||||
"turn_on",
|
||||
{"entity_id": entity.entity_id, "brightness_pct": 2},
|
||||
True,
|
||||
)
|
||||
|
||||
_, data = entity.last_call("turn_on")
|
||||
assert data["brightness"] == 5, data
|
||||
|
||||
await hass.services.async_call(
|
||||
"light", "turn_on", {"entity_id": entity.entity_id, "brightness_pct": 50}, True,
|
||||
"light",
|
||||
"turn_on",
|
||||
{"entity_id": entity.entity_id, "brightness_pct": 50},
|
||||
True,
|
||||
)
|
||||
|
||||
_, data = entity.last_call("turn_on")
|
||||
assert data["brightness"] == 128, data
|
||||
|
||||
await hass.services.async_call(
|
||||
"light", "turn_on", {"entity_id": entity.entity_id, "brightness_pct": 99}, True,
|
||||
"light",
|
||||
"turn_on",
|
||||
{"entity_id": entity.entity_id, "brightness_pct": 99},
|
||||
True,
|
||||
)
|
||||
|
||||
_, data = entity.last_call("turn_on")
|
||||
|
||||
Reference in New Issue
Block a user