basbruss / adaptive-cover

An Adaptive Cover component for HomeAsisstant to control covers based on the sun's position
MIT License
71 stars 10 forks source link

Detected blocking call to import_module inside the event loop #134

Closed swa72 closed 2 months ago

swa72 commented 4 months ago

What version of Adaptive Cover are you using?

1.1.4

What version of Home Assistant are you using?

core-2024.5.0

Checklist

Describe the issue

See dump

Reproduction steps

1. 2. 3. ...

Diagnostics dump

I found this in the logs ...

Logger: homeassistant.util.loop
Source: util/loop.py:99
First occurred: 16:09:56 (1 occurrences)
Last logged: 16:09:56

Detected blocking call to import_module inside the event loop by custom integration 'adaptive_cover' at custom_components/adaptive_cover/sun.py, line 26: times = pd.date_range( (offender: /usr/local/lib/python3.12/site-packages/pandas/compat/_optional.py, line 132: module = importlib.import_module(name)), please create a bug report at https://github.com/basbruss/adaptive-cover/issues
basbruss commented 4 months ago

I am aware of the issue, but for now, I can't find a solution because pandas itself is loading a module inside the event loop.