ollo69 / ha-smartthinq-sensors

HomeAssistant custom integration for SmartThinQ LG devices configurable with Lovelace User Interface.
Apache License 2.0
1.03k stars 149 forks source link

Blocking import on the event loop #741

Closed dmulcahey closed 1 month ago

dmulcahey commented 2 months ago

Describe the bug

Imports need to be fixed so they don’t block the event loop

Output of HA logs Paste the relavant output of the HA log here.

Logger: homeassistant.util.loop
Source: util/loop.py:99
First occurred: 7:52:41 AM (1 occurrences)
Last logged: 7:52:41 AM

Detected blocking call to import_module inside the event loop by custom integration 'smartthinq_sensors' at custom_components/smartthinq_sensors/wideq/core_async.py, line 1637: encoding = detect(content)["encoding"] (offender: /usr/local/lib/python3.12/site-packages/charset_normalizer/utils.py, line 256: importlib.import_module("encodings.{}".format(name)).IncrementalDecoder,), please create a bug report at https://github.com/ollo69/ha-smartthinq-sensors/issues

Additional context Add any other context about the problem here.

ollo69 commented 1 month ago

Closing as duplicated of #745.