Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix duplicate call to async_register_preload_platform #133909

Merged
merged 1 commit into from
Dec 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions homeassistant/helpers/integration_platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,9 @@ async def async_process_integration_platforms(
else:
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)
top_level_components = hass.config.top_level_components.copy()
process_job = HassJob(
Expand All @@ -187,10 +190,6 @@ async def async_process_integration_platforms(
integration_platform = IntegrationPlatform(
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)
if not top_level_components:
return
Expand Down