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

Warning with Core 2024.7 deprecated code 2025.1 Fix proposition #485

Closed
LGO44 opened this issue Jul 5, 2024 · 5 comments
Closed

Warning with Core 2024.7 deprecated code 2025.1 Fix proposition #485

LGO44 opened this issue Jul 5, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@LGO44
Copy link
Contributor

LGO44 commented Jul 5, 2024

Core 2024.7.0
Supervisor 2024.06.2
Operating System 12.4
Interface utilisateur 20240703.0

2024-07-05 09:51:34.272 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that calls async_forward_entry_setup for integration wiser with title: WiserHeat05Exxx and entry_id: c087a7c4e4dbd7cxxxxxxxxxxxxxxxx, during setup without awaiting async_forward_entry_setup, which can cause the setup lock to be released before the setup is done. This will stop working in Home Assistant 2025.1. Please report this issue.
Stack (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "/usr/src/homeassistant/homeassistant/main.py", line 223, in
sys.exit(main())
File "/usr/src/homeassistant/homeassistant/main.py", line 209, in main
exit_code = runner.run(runtime_conf)
File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run
return loop.run_until_complete(setup_and_run_hass(runtime_config))
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete
self.run_forever()
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever
self._run_once()
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once
handle._run()
File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2122, in async_forward_entry_setup
_report_non_awaited_platform_forwards(entry, "async_forward_entry_setup")
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1175, in _report_non_awaited_platform_forwards
report(
File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 151, in report
_LOGGER.warning(msg, stack_info=True)

@LGO44 LGO44 changed the title Warning with Core 2024.0 deprecated code 2025.1 Warning with Core 2024.7 deprecated code 2025.1 Jul 9, 2024
@andyblac
Copy link

andyblac commented Jul 9, 2024

getting the same error.

@LGO44
Copy link
Contributor Author

LGO44 commented Jul 13, 2024

some precisions, at the start of HA I get these warnings:

2024-07-13 10:05:17.001 WARNI2024-07-13 10:05:17.001 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'wiser' calls async_forward_entry_setup for integration, wiser with title: WiserHeat05E6A6 and entry_id: c087a7c4e4dbd7c2057863bf4ecb0a74, which is deprecated and will stop working in Home Assistant 2025.6, await async_forward_entry_setups instead at custom_components/wiser/init.py, line 53: hass.async_create_task(, please create a bug report at https://github.com/asantaga/wiserHomeAssistantPlatform/issues
2024-07-13 10:05:17.123 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'wiser' calls hass.http.register_static_path which is deprecated because it does blocking I/O in the event loop, instead call await hass.http.async_register_static_paths([StaticPathConfig("/wiser", "/config/custom_components/wiser/frontend", False)]); This function will be removed in 2025.7 at custom_components/wiser/frontend/init.py, line 24: self.hass.http.register_static_path(, please create a bug report at https://github.com/asantaga/wiserHomeAssistantPlatform/issuesNG (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'wiser' calls async_forward_entry_setup for integration, wiser with title: WiserHeat05E6A6 and entry_id: c087a7c4e4dbd7c2057863bf4ecb0a74, which is deprecated and will stop working in Home Assistant 2025.6, await async_forward_entry_setups instead at custom_components/wiser/init.py, line 53: hass.async_create_task(, please create a bug report at https://github.com/asantaga/wiserHomeAssistantPlatform/issues
2024-07-13 10:05:17.123 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'wiser' calls hass.http.register_static_path which is deprecated because it does blocking I/O in the event loop, instead call await hass.http.async_register_static_paths([StaticPathConfig("/wiser", "/config/custom_components/wiser/frontend", False)]); This function will be removed in 2025.7 at custom_components/wiser/frontend/init.py, line 24: self.hass.http.register_static_path(, please create a bug report at https://github.com/asantaga/wiserHomeAssistantPlatform/issues

@LGO44
Copy link
Contributor Author

LGO44 commented Jul 15, 2024

In fact there are 2 issues

First one:

2024-07-13 10:05:17.001 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'wiser' calls async_forward_entry_setup for integration, wiser with title: WiserHeat05E6A6 and entry_id: c087a7c4e4dbd7c2057863bf4ecb0a74, which is deprecated and will stop working in Home Assistant 2025.6, await async_forward_entry_setups instead at custom_components/wiser/init.py, line 53: hass.async_create_task(, please create a bug report at https://github.com/asantaga/wiserHomeAssistantPlatform/issues

Fix: in the config/custom_components/wiser/__init__py

init.py.zip

@LGO44
Copy link
Contributor Author

LGO44 commented Jul 15, 2024

Second one:

2024-07-13 10:05:17.123 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'wiser' calls hass.http.register_static_path which is deprecated because it does blocking I/O in the event loop, instead call await hass.http.async_register_static_paths([StaticPathConfig("/wiser", "/config/custom_components/wiser/frontend", False)]); This function will be removed in 2025.7 at custom_components/wiser/frontend/init.py, line 24: self.hass.http.register_static_path(, please create a bug report at https://github.com/asantaga/wiserHomeAssistantPlatform/issues

Fix: in the config/custom_components/wiser/frontend/__init__py

init.py.zip

@LGO44 LGO44 changed the title Warning with Core 2024.7 deprecated code 2025.1 Warning with Core 2024.7 deprecated code 2025.1 Fix proposition Jul 16, 2024
@msp1974 msp1974 added the bug Something isn't working label Sep 7, 2024
@msp1974 msp1974 mentioned this issue Sep 7, 2024
@msp1974
Copy link
Collaborator

msp1974 commented Sep 7, 2024

First issue is fixed in v3.4.8 - just released. Moving second problem to new issue.

@msp1974 msp1974 closed this as completed Sep 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants