mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 20:27:08 +00:00
Run SSDP discovery in parallel (#24299)
This commit is contained in:
parent
d17f27b65c
commit
185af1b42a
@ -86,13 +86,16 @@ class Scanner:
|
||||
if not to_load:
|
||||
return
|
||||
|
||||
for entry, info, domains in to_load:
|
||||
tasks = []
|
||||
|
||||
for entry, info, domains in to_load:
|
||||
for domain in domains:
|
||||
_LOGGER.debug("Discovered %s at %s", domain, entry.location)
|
||||
await self.hass.config_entries.flow.async_init(
|
||||
tasks.append(self.hass.config_entries.flow.async_init(
|
||||
domain, context={'source': DOMAIN}, data=info
|
||||
)
|
||||
))
|
||||
|
||||
await asyncio.wait(tasks)
|
||||
|
||||
async def _process_entry(self, entry):
|
||||
"""Process a single entry."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user