Skip to content

Blocking import_module call inside event loop in pentair_cloud integration (config_flow.py) #12

@llrowland01

Description

@llrowland01

Home Assistant logs a warning during startup indicating that the pentair_cloud custom integration performs a blocking synchronous import inside the event loop. This occurs when loading the integration’s config_flow platform. The warning states that this behavior can cause stability issues and should be corrected by replacing blocking imports with async‑safe patterns.
Observed Behavior:

WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to import_module with args ('custom_components.pentair_cloud.config_flow',) in /usr/src/homeassistant/homeassistant/loader.py, line 1307: return importlib.import_module(f"{self.pkg_path}.{platform_name}") inside the event loop; This is causing stability issues. Please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue
For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#import_module

File "/usr/src/homeassistant/homeassistant/loader.py", line 1307, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
...
custom_components.pentair_cloud.config_flow

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions