FL550 / dwd_weather

Deutscher Wetterdienst integration for Home-Assistant
MIT License
181 stars 11 forks source link

deprecated warning for 2025.1 #132

Closed Tupsi closed 1 month ago

Tupsi commented 1 month ago

Still a lot of time to fix this, but I stumbled over it today, so I thought it wouldn't hurt to put it down here for reference.

Version of home_assistant

2024.7.2

Version of the custom_component

2.1.3

Describe the bug

Deprecated warning for 2025.1 when starting up HA with a configured dwd entry.

Debug log

homeassistant  | 2024-07-15 07:41:00.098 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that calls async_forward_entry_setup for integration dwd_weather with title: Weathermap Precipitation and entry_id: 680119d77d295161df9e3456a55e1c33, 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.
homeassistant  | Stack (most recent call last):
homeassistant  |   File "<frozen runpy>", line 198, in _run_module_as_main
homeassistant  |   File "<frozen runpy>", line 88, in _run_code
homeassistant  |   File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module>
homeassistant  |     sys.exit(main())
homeassistant  |   File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main
homeassistant  |     exit_code = runner.run(runtime_conf)
homeassistant  |   File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run
homeassistant  |     return loop.run_until_complete(setup_and_run_hass(runtime_config))
homeassistant  |   File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete
homeassistant  |     self.run_forever()
homeassistant  |   File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever
homeassistant  |     self._run_once()
homeassistant  |   File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once
homeassistant  |     handle._run()
homeassistant  |   File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
homeassistant  |     self._context.run(self._callback, *self._args)
homeassistant  |   File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2122, in async_forward_entry_setup
homeassistant  |     _report_non_awaited_platform_forwards(entry, "async_forward_entry_setup")
homeassistant  |   File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1175, in _report_non_awaited_platform_forwards
homeassistant  |     report(
homeassistant  |   File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 151, in report
homeassistant  |     _LOGGER.warning(msg, stack_info=True)
FL550 commented 1 month ago

This is fixed in #130 and now published. However thanks for your report!