home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
68.78k stars 28.11k forks source link

Detected blocking call to import_module inside the event loop by integration `mysensors` #116188

Closed firstof9 closed 4 days ago

firstof9 commented 1 week ago

The problem

Detected blocking call to import_module inside the event loop by integration 'mysensors'

What version of Home Assistant Core has the issue?

core-2024.5.0b0

What was the last working version of Home Assistant Core?

core-2024.4.4

What type of installation are you running?

Home Assistant Container

Integration causing the issue

mysensors

Link to integration documentation on our website

https://www.home-assistant.io/integrations/mysensors/

Diagnostics information

No response

Example YAML snippet

n/a

Anything in the logs that might be useful for us?

2024-04-25 11:43:54.453 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to import_module inside the event loop by integration 'mysensors' at homeassistant/components/mysensors/gateway.py, line 192: gateway = mysensors.AsyncMQTTGateway( (offender: /usr/local/lib/python3.12/site-packages/mysensors/const.py, line 31: const = import_module(path)), please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+mysensors%22

Additional information

No response

home-assistant[bot] commented 1 week ago

Hey there @martinhjelmare, @functionpointer, mind taking a look at this issue as it has been labeled with an integration (mysensors) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `mysensors` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign mysensors` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


mysensors documentation mysensors source (message by IssueLinks)

bdraco commented 1 week ago

Looks like a late load in the event loop here https://github.com/theolind/pymysensors/blob/52bac5523ec11aac9d55b97385e755eb8ee96635/mysensors/const.py#L31