jpcornil-git / HA-sma

SMA Sunny Webbox integration for Home Assistant
10 stars 4 forks source link

integration not loading since HA 2023.5.x #7

Closed vadercent closed 1 year ago

vadercent commented 1 year ago

I upgraded this weekend from 2023.4.6 to 2023.5.2 and noticed this integration gives "Failed to set up" In the logs I see the following:

This error originated from a custom integration.

Logger: homeassistant.config_entries
Source: custom_components/sma/__init__.py:137
Integration: SMA Webbox (documentation, issues)
First occurred: 11:09:06 (1 occurrences)
Last logged: 11:09:06

Error setting up entry 172.23.6.50 for sma
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/config/custom_components/sma/__init__.py", line 137, in async_setup_entry
    hass.config_entries.async_setup_platforms(entry, [Platform.SENSOR])
AttributeError: 'ConfigEntries' object has no attribute 'async_setup_platforms'
jpcornil-git commented 1 year ago

This should be addressed already, cfr v2.1.0 release notes => could you give it a try if not done already and confirm that it is indeed fixed

vadercent commented 1 year ago

Hi, a remove and redownload/install from the component eventually solved the problem.

jpcornil-git commented 1 year ago

Thanks for the feedback.

Note that HACS should handle all of this for you, i.e. UI notification when a new release is available as well as removal/installation of custom integrations/lovelace plugins -> recommended over a manual installation.