mirror of
https://github.com/home-assistant/core.git
synced 2025-04-25 09:47:52 +00:00
Fix duplicate call to async_register_preload_platform (#133909)
This commit is contained in:
parent
8d32531bc1
commit
7cfbc3eeae
@ -175,6 +175,9 @@ async def async_process_integration_platforms(
|
|||||||
else:
|
else:
|
||||||
integration_platforms = hass.data[DATA_INTEGRATION_PLATFORMS]
|
integration_platforms = hass.data[DATA_INTEGRATION_PLATFORMS]
|
||||||
|
|
||||||
|
# Tell the loader that it should try to pre-load the integration
|
||||||
|
# for any future components that are loaded so we can reduce the
|
||||||
|
# amount of import executor usage.
|
||||||
async_register_preload_platform(hass, platform_name)
|
async_register_preload_platform(hass, platform_name)
|
||||||
top_level_components = hass.config.top_level_components.copy()
|
top_level_components = hass.config.top_level_components.copy()
|
||||||
process_job = HassJob(
|
process_job = HassJob(
|
||||||
@ -187,10 +190,6 @@ async def async_process_integration_platforms(
|
|||||||
integration_platform = IntegrationPlatform(
|
integration_platform = IntegrationPlatform(
|
||||||
platform_name, process_job, top_level_components
|
platform_name, process_job, top_level_components
|
||||||
)
|
)
|
||||||
# Tell the loader that it should try to pre-load the integration
|
|
||||||
# for any future components that are loaded so we can reduce the
|
|
||||||
# amount of import executor usage.
|
|
||||||
async_register_preload_platform(hass, platform_name)
|
|
||||||
integration_platforms.append(integration_platform)
|
integration_platforms.append(integration_platform)
|
||||||
if not top_level_components:
|
if not top_level_components:
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user