reformatted code using black

This commit is contained in:
tomaae 2020-03-16 04:51:41 +01:00
parent cd4d7c4e81
commit e418c20252
8 changed files with 512 additions and 322 deletions

View file

@ -49,7 +49,9 @@ async def async_setup_entry(hass, config_entry):
else:
traffic_type = DEFAULT_TRAFFIC_TYPE
mikrotik_controller = MikrotikControllerData(hass, config_entry, name, host, port, username, password, use_ssl, traffic_type)
mikrotik_controller = MikrotikControllerData(
hass, config_entry, name, host, port, username, password, use_ssl, traffic_type
)
await mikrotik_controller.hwinfo_update()
await mikrotik_controller.async_update()
@ -77,10 +79,10 @@ async def async_setup_entry(hass, config_entry):
device_registry = await hass.helpers.device_registry.async_get_registry()
device_registry.async_get_or_create(
config_entry_id=config_entry.entry_id,
manufacturer=mikrotik_controller.data['resource']['platform'],
model=mikrotik_controller.data['routerboard']['model'],
name=mikrotik_controller.data['routerboard']['model'],
sw_version=mikrotik_controller.data['resource']['version'],
manufacturer=mikrotik_controller.data["resource"]["platform"],
model=mikrotik_controller.data["routerboard"]["model"],
name=mikrotik_controller.data["routerboard"]["model"],
sw_version=mikrotik_controller.data["resource"]["version"],
)
return True