Reload notify platforms concurrently with asyncio.gather (#39384)

This commit is contained in:
J. Nick Koston authored and GitHub committed 2020-08-29 22:23:57 +02:00
1 parent 22a123fd4b
commit 54ef16f01a
1 file changed
+5 -2
+5 -2
View File
@@ -66,8 +66,11 @@ async def async_reload(hass, integration_name):
):
return
for data in hass.data[NOTIFY_SERVICES][integration_name]:
await _async_setup_notify_services(hass, data)
tasks = [
_async_setup_notify_services(hass, data)
for data in hass.data[NOTIFY_SERVICES][integration_name]
]
await asyncio.gather(*tasks)
async def _async_setup_notify_services(hass, data):