rroller / dahua

Dahua Camera and Doorbell Home Assistant Integration
MIT License
405 stars 82 forks source link

Deprecation Warning 2024.7.0 #369

Open lionslair opened 4 months ago

lionslair commented 4 months ago

Is your feature request related to a problem? Please describe.

There is a new deprecation warning in HA 2024.7.0 appearing in the logs

Describe the solution you'd like Update integration

Describe alternatives you've considered N/A

Additional context Log message below

Detected that custom integration 'dahua' calls async_forward_entry_setup for integration, dahua with title: NVR 6 and entry_id: 19c39c8e048176b3a713a86601569bd2, which is deprecated and will stop working in Home Assistant 2025.6, await async_forward_entry_setups instead at custom_components/dahua/__init__.py, line 85: hass.async_create_task(, please create a bug report at https://github.com/rroller/dahua/issues

May be a HACS thing https://github.com/hacs/integration/issues/3850

Pastaloverzzz commented 4 months ago

I get almost the same error but it says it will be depreciated in 2025.1 instead of 2025.6. Detected code that calls async_forward_entry_setup for integration dahua with title: CamVooraan and entry_id: 3f9ab753ea282e390ca028ff8353924b, 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.

normalee1993 commented 4 months ago

Hi, I am getting the same warning for it being depreciated in 2025.1

Core 2024.7.3 Supervisor 2024.06.2 Operating System 12.4 Frontend 20240710.0

Logger: homeassistant.helpers.frame
Source: helpers/frame.py:151
First occurred: 2:34:15 PM (5 occurrences)
Last logged: 2:34:15 PM

Detected code that calls async_forward_entry_setup for integration dahua with title: Front Porch and entry_id: 2f89fa81c70ceffa86d8452f86534b4d, 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.
yfands commented 3 months ago

Detected that custom integration 'dahua' calls async_forward_entry_setup for integration, dahua with title: CameraOprit and entry_id: e1bc3dd8f74b4d16a8a547831xxxxxxx, which is deprecated and will stop working in Home Assistant 2025.6, await async_forward_entry_setups instead at custom_components/dahua/init.py, line 85: hass.async_create_task(, please create a bug report at https://github.com/rroller/dahua/issues

mattdevo1 commented 3 months ago

I get almost the same error but it says it will be depreciated in 2025.1 instead of 2025.6.

Detected code that calls async_forward_entry_setup for integration dahua with title: CamVooraan and entry_id: 3f9ab753ea282e390ca028ff8353924b, 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'm getting this same error. Running HA 2024.8.2 and Dahua 0.9.60 (latest for both).

ummarbhutta commented 1 month ago

I am also getting similar issue. Stack trace below

2024-10-04 09:21:33.454 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that calls async_forward_entry_setup for integration dahua with title: Camera 3 and entry_id: ABCXYZ, 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 "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module>
    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 189, 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 2184, in async_forward_entry_setup
    _report_non_awaited_platform_forwards(entry, "async_forward_entry_setup")
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1201, 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)

HA - Version: 2024.9.1 Dahua Integration Version: 0.9.60 Dahua Camera Version: DH-IPC-HFW1239TL1-A-IL Dahua Camera FW version: 2.860.0000000.6.R,build:2023-09-01