skodaconnect / homeassistant-skodaconnect

Skoda Connect - A home assistant plugin to add integration with your car
Apache License 2.0
233 stars 27 forks source link

Getting "detected code that calls async_forward_entry_setup" in HA 2024.7.0b4 #292

Closed ChristophCaina closed 4 months ago

ChristophCaina commented 5 months ago

IMPORTANT NOTE

This integration currently only supports the old Skoda API compatible with the old Skoda Essentials App.

If you are unable to use the Skoda Essentials account the integration will not work for you. This is the case for new vehicles and/or Skoda accounts.

We are aware the Skoda Essentials app is being deprecated and are working on updating the integration to be compatible with the new API / MySkoda app, but this is a major piece of development work.

Please do not open new issues for this.

Please search issues in https://github.com/skodaconnect/skodaconnect and https://github.com/skodaconnect/homeassistant-skodaconnect for duplicates or fixes before reporting a new issue.

Describe the bug HA 2024.7.0b4 is reporting the following warning:

Logger: homeassistant.helpers.frame
Source: helpers/frame.py:151
First occurred: 11:43:29 AM (24 occurrences)
Last logged: 11:43:41 AM

Detected code that calls async_forward_entry_setup for integration skodaconnect with title: TMB******235 and entry_id: b9414cf02e2eb912fbb7407fea826e2c, 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.

**Is this working in MySkoda app?*** Logout and login in the MySkoda app, preferably on Android. Make sure that you have the latest app updates, sometimes there's new consent needed that will only show in latest app version.

Latest working release If the problem started after updating to a new release, please state latest working release.

Debug logs If applicable, add debug logs. See README on how to enable debug logs with response debugging.

Installation:

Additional context Add any other context about the problem here.

rds76 commented 1 month ago

Are you sure the fix is correct, base on this? https://developers.home-assistant.io/blog/2024/06/12/async_forward_entry_setups/ The code should be changed with something like:

for component in components:
        coordinator.platforms.append(component)
hass.async_create_task(
        hass.config_entries.async_forward_entry_setups(entry, components)
)