jeroenterheerdt / HAsmartirrigation

Smart Irrigation custom component for Home Assistant
MIT License
301 stars 47 forks source link

Log Warning: Detected blocking call #357

Open dlindnegm opened 2 weeks ago

dlindnegm commented 2 weeks ago

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

Additional information

No response

jata1 commented 1 week ago

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.

jeroenterheerdt commented 1 week ago

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

wauswaus commented 6 days ago

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.

jeroenterheerdt commented 6 days ago

Yes, I am investigating it, but it's not an easy fix.