mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Fix platforms being able to block startup (#7970)
This commit is contained in:
parent
4aef0b68bc
commit
640c692e1f
@ -151,8 +151,10 @@ class EntityComponent(object):
|
||||
entity_platform.async_schedule_add_entities, discovery_info
|
||||
)
|
||||
else:
|
||||
task = self.hass.async_add_job(
|
||||
platform.setup_platform, self.hass, platform_config,
|
||||
# This should not be replaced with hass.async_add_job because
|
||||
# we don't want to track this task in case it blocks startup.
|
||||
task = self.hass.loop.run_in_executor(
|
||||
None, platform.setup_platform, self.hass, platform_config,
|
||||
entity_platform.schedule_add_entities, discovery_info
|
||||
)
|
||||
yield from asyncio.wait_for(
|
||||
|
Loading…
x
Reference in New Issue
Block a user