dingo35 / ha-SmartEVSEv3

Integrate SmartEVSEv3 with HomeAssistant through custom component
13 stars 8 forks source link

Detected code that calls async_forward_entry_setup for integration smartevse #32

Closed matthijs closed 4 days ago

matthijs commented 2 weeks ago

Home Assistant version: 2024.7.0

Following error in the logs: WARNING (MainThread) [homeassistant.helpers.frame] Detected code that calls async_forward_entry_setup for integration smartevse with title: 6969 and entry_id: d1d9e0b23887f05657012098355f5b32, 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.

I am getting the following stack trace:

Stack (most recent call last):
  File "/home/homeassistant/hass-venv312/bin/hass", line 8, in <module>
    sys.exit(main())
  File "/home/homeassistant/hass-venv312/lib/python3.12/site-packages/homeassistant/__main__.py", line 209, in main
    exit_code = runner.run(runtime_conf)
  File "/home/homeassistant/hass-venv312/lib/python3.12/site-packages/homeassistant/runner.py", line 190, in run
    return loop.run_until_complete(setup_and_run_hass(runtime_config))
  File "/usr/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete
    self.run_forever()
  File "/usr/lib/python3.12/asyncio/base_events.py", line 641, in run_forever
    self._run_once()
  File "/usr/lib/python3.12/asyncio/base_events.py", line 1987, in _run_once
    handle._run()
  File "/usr/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/home/homeassistant/hass-venv312/lib/python3.12/site-packages/homeassistant/config_entries.py", line 2122, in async_forward_entry_setup
    _report_non_awaited_platform_forwards(entry, "async_forward_entry_setup")
  File "/home/homeassistant/hass-venv312/lib/python3.12/site-packages/homeassistant/config_entries.py", line 1175, in _report_non_awaited_platform_forwards
    report(
  File "/home/homeassistant/hass-venv312/lib/python3.12/site-packages/homeassistant/helpers/frame.py", line 151, in report
    _LOGGER.warning(msg, stack_info=True)
dingo35 commented 2 weeks ago

Thx for your report; HA developers keep changing stuff without any backward compatibility or documentation, so I will await a PR from someone who understands what this is about....

dingo35 commented 4 days ago

Fixed in f83596c5097b Thx!