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

[Due 2025.6] Warning: Detected that 'tapo_control' calls async_forward_entry_setup which is deprecated #616

Closed
tjorim opened this issue Jun 27, 2024 · 3 comments
Labels
Fixed Bug has been fixed.
Milestone

Comments

@tjorim
Copy link

tjorim commented Jun 27, 2024

Description

Will stop working in Home Assistant 2025.6, await async_forward_entry_setups instead.

Reproduction Steps

Update HA to 2024.7 and check logs

Expected behavior

No warnings about deprecated calls

If applicable, add error logs.

Logger: homeassistant.helpers.frame
Source: helpers/frame.py:184
First occurred: 00:28:27 (25 occurrences)
Last logged: 00:30:47

Detected that custom integration 'tapo_control' calls async_forward_entry_setup for integration, tapo_control with title: 192.168.0.210 and entry_id: e5ca38dd4c59907de1b1e993dce8c967, which is deprecated and will stop working in Home Assistant 2025.6, await async_forward_entry_setups instead at custom_components/tapo_control/__init__.py, line 659: hass.async_create_task(, please create a bug report at https://github.com/JurajNyiri/HomeAssistant-Tapo-Control/issues
Detected that custom integration 'tapo_control' calls async_forward_entry_setup for integration, tapo_control with title: 192.168.0.210 and entry_id: e5ca38dd4c59907de1b1e993dce8c967, which is deprecated and will stop working in Home Assistant 2025.6, await async_forward_entry_setups instead at custom_components/tapo_control/__init__.py, line 662: hass.async_create_task(, please create a bug report at https://github.com/JurajNyiri/HomeAssistant-Tapo-Control/issues
Detected that custom integration 'tapo_control' calls async_forward_entry_setup for integration, tapo_control with title: 192.168.0.210 and entry_id: e5ca38dd4c59907de1b1e993dce8c967, which is deprecated and will stop working in Home Assistant 2025.6, await async_forward_entry_setups instead at custom_components/tapo_control/__init__.py, line 665: hass.async_create_task(, please create a bug report at https://github.com/JurajNyiri/HomeAssistant-Tapo-Control/issues

Device Firmware

n/a

Integration Version

5.4.18

Using stream component

Yes

Does camera work via official integrations?

Yes

Camera has all attributes filled out in developer tools

Yes

HASS Environment

Home Assistant OS

Search for similar issues

Yes

Additional information

No response

@tjorim
Copy link
Author

tjorim commented Jun 27, 2024

And similar warning but will break in HA version 2025.1:

Logger: homeassistant.helpers.frame
Source: helpers/frame.py:151
First occurred: 00:28:51 (7 occurrences)
Last logged: 00:30:33

Detected code that calls async_forward_entry_setup for integration tapo_control with title: 192.168.0.210 and entry_id: e5ca38dd4c59907de1b1e993dce8c967, 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.

@bdraco
Copy link

bdraco commented Jun 28, 2024

await hass.config_entries.async_forward_entry_unload(entry, "binary_sensor")

While it won't break, the unloads could be switched to use await hass.config_entries.async_unload_platforms(entry, PLATFORMS) instead as its more efficient

@JurajNyiri JurajNyiri changed the title Warning: Detected that 'tapo_control' calls async_forward_entry_setup which is deprecated [Due 2025.6] Warning: Detected that 'tapo_control' calls async_forward_entry_setup which is deprecated Jul 3, 2024
@JurajNyiri JurajNyiri reopened this Jul 4, 2024
@JurajNyiri JurajNyiri added this to the 5.4.19 milestone Jul 4, 2024
@JurajNyiri
Copy link
Owner

@JurajNyiri JurajNyiri added the Fixed Bug has been fixed. label Jul 4, 2024
marcosngomezi pushed a commit to marcosngomezi/HomeAssistant-Tapo-Control that referenced this issue Jul 20, 2024
JurajNyiri added a commit that referenced this issue Jul 20, 2024
* changes

* tapo-siren-fix

* getMost-list-breaking-change

* siren-and-select

* comments

* fixes-and-comments

* numbers

* siren

* unneded-mapings

* cleanup

* testing-fixes

* cleanup

* Fix: PR does not work with C200 1.0 1.3.6

* fix-siren

* Update README.md to add instructions in case the cloud password does not work.

* Update README.md

* Update README.md

* Update README.md

* Implement color mode

Reference:
https://developers.home-assistant.io/docs/core/entity/light#color-modes

> New integrations must implement both color_mode and supported_color_modes.
> If an integration is upgraded to support color mode, both color_mode and
> supported_color_modes should be implemented.

This also fixes this warning at startup:

```
WARNING (MainThread) [homeassistant.components.light] None (<class 'custom_components.tapo_control.light.TapoWhitelight'>) does not set supported color modes, this will stop working in Home Assistant Core 2025.3, please create a bug report at https://github.com/JurajNyiri/HomeAssistant-Tapo-Control/issues
```

* Create ru.json

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Fix #568: IP address is not a supported Tapo device

* Update issues.yml

* Update issues.yml

* Update issues.yml

* Update issues.yml

* Update issues.yml

* Update issues.yml

* Update issues.yml

* Update issues.yml

* Update issues.yml

* Update issues.yml

* Update issues.yml

* Update issues.yml

* Update issues.yml

* Update issues.yml

Temporarily disable cloud password close bot

* Update issues.yml

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* changes

* tapo-siren-fix

* getMost-list-breaking-change

* siren-and-select

* comments

* fixes-and-comments

* numbers

* siren

* unneded-mapings

* cleanup

* testing-fixes

* cleanup

* fix-siren

* Handle cleanup of config entry

* Fix: PR does not work with C200 1.0 1.3.6

* alarm-status-false-default

* Fix #616: Warning for async_forward_entry_setup

* Fix #612, #615, #530, #525

* Fix: Blocking call when copying file from cold to hot storage

* Add: Binary sensor with details about media sync setup

* Fix #572: ffmpeg for sound detection doesn't terminate on Home Assistant restart

* Fix #561: Unexpected error fetching Tapo resource status data

* Fix #571: Incorrect device_class for D230 doorbell battery sensor

* Fix: Descalate "Recording is currently in progress." warning to info on media sync

* Add: HDR switch

* Add: Experimental optimization for battery cameras

* Fix: Update interval is now based on whether the device has a battery or not

* Update: Automatically determine whether the device is currently running on battery or not and adjust update interval

* Fix: Camera entities ignoring update threshold

* Update README.md

* Update README.md

* Create add_camera_with_new_firmware.md

* Update README.md

* Update add_camera_with_new_firmware.md

* Update add_camera_with_new_firmware.md

* Fix #629, #621: Setup for switch entities fails for some cameras

* Add #457: Battery optimization for solar cameras

* Update: Migrate update interval to config entry storage

* Add: Configurable update interval

* Update: Bump version

* Update: Guides for new firmwares workaround

* Update: Readme instructions about stopping use of tapo app not required

* Update: Readme formatting

* Update README.md

* Update add_camera_with_new_firmware.md

* Update README.md

* Fix: Removal of disabled device results in error and warning, time sync debug log

* Fix #450: Config entry name resets on reconfiguration

* Update: Bump version

* Fix: stopManualAlarm instead of start on siren off

* Fix: Mute error on siren on/off

* Update: Revert result_has_error changes

* Update: Ensure compatibility with #632

---------

Co-authored-by: marcosngomezi <[email protected]>
Co-authored-by: Antoine Buchser <[email protected]>
Co-authored-by: L. López <[email protected]>
Co-authored-by: Virenbar <[email protected]>
Co-authored-by: Nathan Spencer <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed Bug has been fixed.
Projects
None yet
Development

No branches or pull requests

3 participants