jwillemsen / daikin_onecta

Home Assistant Integration for devices supported by the Daikin Onecta App
https://github.com/jwillemsen/daikin_onecta
GNU General Public License v3.0
179 stars 8 forks source link

[Issue]: calls async_forward_entry_setup without awaiting #248

Open brefra opened 3 days ago

brefra commented 3 days ago

daikin_onecta version: 4.1.11 HA version: 2024.7.0

The following log entry appears:

Logger: homeassistant.helpers.frame Source: helpers/frame.py:151 First occurred: 12:52:59 (6 occurrences) Last logged: 12:52:59

Detected code that calls async_forward_entry_setup for integration daikin_onecta with title: Daikin Onecta API and entry_id: 8e4ab0a212dc5e4cc9b0f12a1fdb5bff, 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.

Quick suggestion based on dev blog post: https://developers.home-assistant.io/blog/2024/06/12/async_forward_entry_setups and https://developers.home-assistant.io/docs/config_entries_index#for-platforms

https://github.com/jwillemsen/daikin_onecta/blob/master/custom_components/daikin_onecta/__init__.py#L60 needs to be replaced by something like: await hass.config_entries.async_forward_entry_setups(config_entry, COMPONENT_TYPES)

When time allows I'll check/test this out and submit a PR somewhere this weekend....

jwillemsen commented 3 days ago

Thanks for reporting, I haven't upgraded personally yet to 2024.7, will do that after July 12th