CyrielRct / midea_ac_lan

Auto-configure and then control your Midea M-Smart devices (Air conditioner, Fan, Water heater, Washer, etc) via local area network.
MIT License
41 stars 4 forks source link

Detected blocking call to import_module inside the event loop #7

Open Dino0005 opened 6 months ago

Dino0005 commented 6 months ago

HA core version

2024.5.1

Intergration version

0.3.24

Device type and model

Air Conditioner 00000Q13 (8) and Air Conditioner 00000Q18 (44204)

Used App

MSartHome and Home Assistant

The description of problem

Registratore: homeassistant.util.loop Fonte: util/loop.py:99 Prima occorrenza: 19:40:39 (4 occorrenze) Ultima registrazione: 19:40:39

Detected blocking call to import_module inside the event loop by custom integration 'midea_ac_lan' at custom_components/midea_ac_lan/midea/devices/init.py, line 23: module = import_module(device_path, package) (offender: /config/custom_components/midea_ac_lan/midea/devices/init.py, line 23: module = import_module(device_path, package)), please create a bug report at https://github.com/georgezhao2010/midea_ac_lan/issues

The logs

2024-05-03 19:40:19.859 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration midea_ac_lan which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2024-05-03 19:40:39.334 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to import_module inside the event loop by custom integration 'midea_ac_lan' at custom_components/midea_ac_lan/midea/devices/init.py, line 23: module = import_module(device_path, package) (offender: /config/custom_components/midea_ac_lan/midea/devices/init.py, line 23: module = import_module(device_path, package)), please create a bug report at https://github.com/georgezhao2010/midea_ac_lan/issues 2024-05-03 19:40:39.363 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to import_module inside the event loop by custom integration 'midea_ac_lan' at custom_components/midea_ac_lan/midea/devices/init.py, line 23: module = import_module(device_path, package) (offender: /config/custom_components/midea_ac_lan/midea/devices/init.py, line 23: module = import_module(device_path, package)), please create a bug report at https://github.com/georgezhao2010/midea_ac_lan/issues 2024-05-03 19:40:39.374 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to import_module inside the event loop by custom integration 'midea_ac_lan' at custom_components/midea_ac_lan/midea/devices/init.py, line 23: module = import_module(device_path, package) (offender: /config/custom_components/midea_ac_lan/midea/devices/init.py, line 23: module = import_module(device_path, package)), please create a bug report at https://github.com/georgezhao2010/midea_ac_lan/issues 2024-05-03 19:40:39.384 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to import_module inside the event loop by custom integration 'midea_ac_lan' at custom_components/midea_ac_lan/midea/devices/init.py, line 23: module = import_module(device_path, package) (offender: /config/custom_components/midea_ac_lan/midea/devices/init.py, line 23: module = import_module(device_path, package)), please create a bug report at https://github.com/georgezhao2010/midea_ac_lan/issues

Debug logging: home-assistant_midea_ac_lan_2024-05-05T11-40-46.319Z.log

attilaersek commented 6 months ago

@Dino0005 my change with a fix just got merged. Could you please test it and share your results?

Dino0005 commented 6 months ago

Hi @attilaersek , I'm on HA 2024.5.2, I replaced these files: custom_components/midea_ac_lan/init.py custom_components/midea_ac_lan/manifest.json custom_components/midea_ac_lan/midea/devices/init.py and after rebooting I no longer had this issue. Thanks