gazoodle / gecko-home-assistant

Home Assistant integration for spas equipped with Gecko Alliance in.touch2 modules
MIT License
69 stars 24 forks source link

[homeassistant.util.loop] Detected blocking call to import_module with args #112

Open PsychoQuesadilla opened 1 month ago

PsychoQuesadilla commented 1 month ago

Version of the custom_component

v0.1.11

Configuration

No yaml, all UI config

Describe the bug

After updating to Home Assistant Core 2024.9.2, I noticed this warning message. Could have been there for a couple of version but this was the first time I saw it. Integration seems to be running fine despite the warning message, but could be good to get rid of, specially if it is causing stability issues.

Debug log

WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to import_module with args ('geckolib.driver.packs.inyt',) in /usr/local/lib/python3.12/site-packages/geckolib/async_spa.py, line 270: GeckoPack = importlib.import_module(pack_module_name).GeckoPack inside the event loop; This is causing stability issues.

Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/main.py", line 223, in sys.exit(main()) File "/usr/src/homeassistant/homeassistant/main.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 189, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/usr/local/lib/python3.12/site-packages/geckolib/async_spa_manager.py", line 543, in _sequence_pump await self.async_connect(self._spa_identifier, self._spa_address) File "/usr/local/lib/python3.12/site-packages/geckolib/async_spa_manager.py", line 334, in async_connect return await self.async_connect_to_spa(spa_descriptors[0]) File "/usr/local/lib/python3.12/site-packages/geckolib/async_spa_manager.py", line 300, in async_connect_to_spa await self._spa.connect() File "/usr/local/lib/python3.12/site-packages/geckolib/async_spa.py", line 367, in connect await self._connect() File "/usr/local/lib/python3.12/site-packages/geckolib/async_spa.py", line 270, in _connect GeckoPack = importlib.import_module(pack_module_name).GeckoPack

EFCAugure commented 1 month ago

Hello same thing for me since some days. It was working fine before. Actions, sensors and diagnostics are not available anymore Tell me if i can help.

I am running Home Assistant OS (2024.9.3) on Proxmox (8) VM `2024-09-25 21:36:11.811 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to import_module with args ('geckolib.driver.packs.inyt-log-81',) in /usr/local/lib/python3.12/site-packages/geckolib/async_spa.py, line 309: GeckoLogStruct = importlib.import_module(log_module_name).GeckoLogStruct 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 Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/main.py", line 223, in sys.exit(main()) File "/usr/src/homeassistant/homeassistant/main.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 189, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/usr/local/lib/python3.12/site-packages/geckolib/async_spa_manager.py", line 543, in _sequence_pump await self.async_connect(self._spa_identifier, self._spa_address) File "/usr/local/lib/python3.12/site-packages/geckolib/async_spa_manager.py", line 334, in async_connect return await self.async_connect_to_spa(spa_descriptors[0]) File "/usr/local/lib/python3.12/site-packages/geckolib/async_spa_manager.py", line 300, in async_connect_to_spa await self._spa.connect() File "/usr/local/lib/python3.12/site-packages/geckolib/async_spa.py", line 367, in connect await self._connect() File "/usr/local/lib/python3.12/site-packages/geckolib/async_spa.py", line 309, in _connect GeckoLogStruct = importlib.import_module(log_module_name).GeckoLogStruct

2024-09-25 21:36:19.825 WARNING (MainThread) [homeassistant.components.fan] Entity None (<class 'custom_components.gecko.fan.GeckoFan'>) does not set FanEntityFeature.TURN_OFF but implements the turn_off method. Please create a bug report at https://github.com/gazoodle/gecko-home-assistant/issues`

And of course : thanks a lot for this dev!!!!!! Lionel