Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Integration uses deprecated functions since 2024.5 + Detected blocking call to import_module inside the event loop #2023

Closed
3 of 7 tasks
TheZoker opened this issue Apr 26, 2024 · 5 comments · Fixed by #2041

Comments

@TheZoker
Copy link

I Have A Problem With:

The integration in general

What's Your Problem

Since version 2024.5, HA deprecated some functions. I listed the relevant log errors below

Source (if relevant)

No response

Logs

Detected that custom integration 'waste_collection_schedule' accesses hass.helpers.discovery. This is deprecated and will stop working in Home Assistant 2024.11, it should be updated to import functions used from discovery directly at custom_components/waste_collection_schedule/__init__.py, line 120: await hass.helpers.discovery.async_load_platform(, please report it to the author of the 'waste_collection_schedule' custom integration


Detected blocking call to import_module inside the event loop by custom integration 'waste_collection_schedule' at custom_components/waste_collection_schedule/waste_collection_schedule/source_shell.py, line 188: source_module = importlib.import_module( (offender: /config/custom_components/waste_collection_schedule/waste_collection_schedule/source_shell.py, line 188: source_module = importlib.import_module(), please report it to the author of the 'waste_collection_schedule' custom integration

Relevant Configuration

No response

Checklist Source Error

  • Use the example parameters for your source (often available in the documentation) (don't forget to restart Home Assistant after changing the configuration)
  • Checked that the website of your service provider is still working
  • Tested my attributes on the service provider website (if possible)
  • I have tested with the latest version of the integration (master) (for HACS in the 3 dot menu of the integration click on "Redownload" and choose master as version)

Checklist Sensor Error

  • Checked in the Home Assistant Calendar tab if the event names match the types names (if types argument is used)

Required

  • I have searched past (closed AND opened) issues to see if this bug has already been reported, and it hasn't been.
  • I understand that people give their precious time for free, and thus I've done my very best to make this problem as easy as possible to investigate.
@5ila5
Copy link
Collaborator

5ila5 commented Apr 28, 2024

The first one is fixable with 2 lines (#2023).
Not sure what's the best approach with the second warning as I do not have much experience with the actual code interacting with HA, maybe @mampfes could have a look or someone else with more experience with HA development.

@ReneNulschDE
Copy link
Contributor

The second one is not that easy. The workday and smartthings integration have the same problem and it was solved there. I tried to adopt that to this component but without success so far. Still working on it but with limited time - traveling through Europe for the next 5 weeks.

@larena1
Copy link
Contributor

larena1 commented May 1, 2024

The second one is not that easy. The workday and smartthings integration have the same problem and it was solved there. I tried to adopt that to this component but without success so far. Still working on it but with limited time - traveling through Europe for the next 5 weeks.

No idea what you're trying but fixing that only takes a few seconds as in #2041

@ArMaTeC
Copy link

ArMaTeC commented May 7, 2024

I have the same issue
Logger: homeassistant.util.loop
Source: util/loop.py:99
First occurred: 15:59:19 (1 occurrences)
Last logged: 15:59:19

Detected blocking call to import_module inside the event loop by custom integration 'waste_collection_schedule' at custom_components/waste_collection_schedule/waste_collection_schedule/source_shell.py, line 188: source_module = importlib.import_module( (offender: /config/custom_components/waste_collection_schedule/waste_collection_schedule/source_shell.py, line 188: source_module = importlib.import_module(), please report it to the author of the 'waste_collection_schedule' custom integration

@5ila5 5ila5 changed the title [Bug]: Integration uses deprecated functions since 2024.5 [Bug]: Integration uses deprecated functions since 2024.5 + Detected blocking call to import_module inside the event loop May 13, 2024
@Morpheus2018
Copy link

Same here!
Core 2024.5.3
Supervisor 2024.05.1
Operating System 12.3
Frontend 20240501.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants