Upgrade black to 20.8b1 (#39287)

This commit is contained in:
Franck Nijhof authored and GitHub committed 2020-08-27 13:56:20 +02:00
1 parent 0d7eec710c
commit 1c2ebdf307
574 files changed
+4389 -1725

No files matched your search

+4 -1
View File
@@ -107,7 +107,10 @@ async def test_get_action_capabilities(hass, device_reg, entity_reg):
connections={(device_registry.CONNECTION_NETWORK_MAC, "12:34:56:AB:CD:EF")},
)
entity_reg.async_get_or_create(
DOMAIN, "test", "5678", device_id=device_entry.id,
DOMAIN,
"test",
"5678",
device_id=device_entry.id,
)
actions = await async_get_device_automations(hass, "action", device_entry.id)
+16 -4
View File
@@ -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")