Fllorent0D / ha-custom-component-sodexo-be

Sodexo Be - Custom Component for Home Assistant
MIT License
4 stars 2 forks source link

HA 2023.5.2 error #3

Closed luckyzor closed 1 year ago

luckyzor commented 1 year ago

last version of this repo. having this error after update HA to 2023.5.2:

Logger: homeassistant.config_entries Source: custom_components/sodexo/init.py:27 Integration: Sodexo meal card integration for Belgium (documentation, issues) First occurred: 23:35:00 (1 occurrences) Last logged: 23:35:00

Error setting up entry Sodexo aureliequede@hotmail.com for sodexo 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/sodexo/init.py", line 27, in async_setup_entry hass.config_entries.async_setup_platforms(entry, PLATFORMS) AttributeError: 'ConfigEntries' object has no attribute 'async_setup_platforms'

bugzke commented 1 year ago

Hi @luckyzor CC @Fllorent0D

You can fix this by changing line 27 in init.py from hass.config_entries.async_setup_platforms(entry, PLATFORMS) to await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)

Did this manually, rebooted and all working again

Fllorent0D commented 1 year ago

Hi guys,

Thanks to #4 from @bugzke this is fixed.