Skip to content

Detected blocking call to import_module in Home Assistant 2026.4 #24

Description

@meelis-gift

Home Assistant logs this warning immediately after every restart/startup, while the Compit integration is being loaded:

Detected blocking call to import_module with args ('compit_inext_api.definitions',)
inside the event loop by custom integration 'compit'
at custom_components/compit/init.py, line 33:
connected = await connector.init()

Integration version: 2.0.0
Home Assistant Core: 2026.4.0
Installation type: Home Assistant OS
Python: 3.14

The integration still appears to work, but Home Assistant reports this as a blocking operation warning.

HA developer docs say imports inside the event loop should be moved to module-level imports or handled outside the event loop:
https://developers.home-assistant.io/docs/asyncio_blocking_operations/#import_module
https://developers.home-assistant.io/docs/asyncio_imports/

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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