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/
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/