puttyman / hass-amplifi

A home assistant integration for Ubiquiti Amplifi
27 stars 16 forks source link

async_setup_platforms instead of awaiting async_forward_entry_setups #28

Closed Lovski closed 2 months ago

Lovski commented 1 year ago

Hi there, in the newest version of HomeAssistant (2023.2.2) the following error pops up on starting. It looks like compatibility of this awesome Amplifi integration will (partially) break as of version 2023.3. I hope it is possible to amend the integration to ensure it keeps working after 2023.3.

Logger: homeassistant.helpers.frame Source: helpers/frame.py:77 First occurred: 08:10:51 (1 occurrences) Last logged: 08:10:51

Detected integration that called async_setup_platforms instead of awaiting async_forward_entry_setups; this will fail in version 2023.3. Please report issue to the custom integration author for amplifi using this method at custom_components/amplifi/init.py, line 37: hass.config_entries.async_setup_platforms(entry, PLATFORMS)

puttyman commented 1 year ago

Hi @Lovski , thanks for bringing this up. Unfortunately, I have moved away from the Amplifi line routers and can no longer support on going fixes since I can no longer test them.

However, I am more than happy to review and approve any incoming PR to address any issue moving forward. Cheers.

Lovski commented 1 year ago

Thank you for your quick reply and all your work on this integration! I am sorry to hear that, but appreciate your efforts! I am by far not savvy enough to work on this, so I may just stick with 2023.2.2 for the time being :).

plesetsk commented 1 year ago

it seems that this gonna be an issue for me as well. =)

plesetsk commented 1 year ago

Ok. I have changed /config/custom_components/amplifi/init.py.

37 #    hass.config_entries.async_setup_platforms(entry, PLATFORMS)
37    await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS) 

It works fine for me in HA 2023.3.1

Lovski commented 1 year ago

Nice! Even without that modification under 2023.3.1 it still appeared to work, but maybe later this month it would otherwise break :).