HAsmartirrigation
HAsmartirrigation copied to clipboard
Log Warning: Detected blocking call
What happened?
Started noticing this warning in my HA logs after upgrading to Core 2024.5.0. No issues with the integration as far as I can tell.
How to reproduce
Core 2024.5.0 Supervisor 2024.04.4 Operating System 12.2
config_entry-smart_irrigation-5154ea7f8196b4cbd9986fbae091721b (1).json
Relevant log output
Logger: homeassistant.util.loop
Source: util/loop.py:99
First occurred: May 2, 2024 at 11:45:00 PM (42 occurrences)
Last logged: May 2, 2024 at 11:45:01 PM
Detected blocking call to import_module inside the event loop by custom integration 'smart_irrigation' at custom_components/smart_irrigation/helpers.py, line 436: mod = importlib.import_module( (offender: /config/custom_components/smart_irrigation/helpers.py, line 436: mod = importlib.import_module(), please create a bug report at https://github.com/jeroenterheerdt/HASmartIrrigation/issues
Which version are you running?
v2024.4.3
Diagnostics file
- [X] I have attached a diagnostics file
Additional information
No response
Just confirming that I have the same in my logs.
And smart watering has not been working for a few weeks now. I think since from around 4th or 5th April - so maybe when I updated HA to 2024.4.
A warning should not stop the integration from working. Something else is going on, but I can't see it in the info you provided
Isn't this a change of policy from the Home Assistant team? That they don't want to to have blocking calls in the event loop as this can cause a system wide hickup when this call takes some time to return? I think it is worth to investigate if this blocking call can be done in another way.
Yes, I am investigating it, but it's not an easy fix.
I am also seeing this FWIW.
Logger: homeassistant.util.loop
Source: util/loop.py:99
First occurred: 1:58:43 PM (15 occurrences)
Last logged: 4:50:16 PM
Detected blocking call to import_module inside the event loop by custom integration 'smart_irrigation' at custom_components/smart_irrigation/helpers.py, line 436: mod = importlib.import_module( (offender: /config/custom_components/smart_irrigation/helpers.py, line 436: mod = importlib.import_module(), please create a bug report at https://github.com/jeroenterheerdt/HASmartIrrigation/issues