Fix issues after pylint update (#53205)

This commit is contained in:
Marc Mueller 2021-07-20 05:22:13 +02:00 committed by GitHub
parent ac9e4cb2f2
commit 7711ac901c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

View File

@ -635,9 +635,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
await asyncio.wait(update_tasks) await asyncio.wait(update_tasks)
for air_purifier_service, method in SERVICE_TO_METHOD.items(): for air_purifier_service, method in SERVICE_TO_METHOD.items():
schema = method[air_purifier_service].get( schema = method.get("schema", AIRPURIFIER_SERVICE_SCHEMA)
"schema", AIRPURIFIER_SERVICE_SCHEMA
)
hass.services.async_register( hass.services.async_register(
DOMAIN, air_purifier_service, async_service_handler, schema=schema DOMAIN, air_purifier_service, async_service_handler, schema=schema
) )

View File

@ -251,7 +251,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
await asyncio.wait(update_tasks) await asyncio.wait(update_tasks)
for plug_service, method in SERVICE_TO_METHOD.items(): for plug_service, method in SERVICE_TO_METHOD.items():
schema = method[plug_service].get("schema", SERVICE_SCHEMA) schema = method.get("schema", SERVICE_SCHEMA)
hass.services.async_register( hass.services.async_register(
DOMAIN, plug_service, async_service_handler, schema=schema DOMAIN, plug_service, async_service_handler, schema=schema
) )