akhudek / legrand_rflc

Home Assistant component for Legrand LC7001.
MIT License
3 stars 2 forks source link

Broken by Home Assistant Core 2023.5 #2

Closed MichaelB2018 closed 1 year ago

MichaelB2018 commented 1 year ago

This integration was broken by Home Assistant Core 2023.5:

https://github.com/home-assistant/core/pull/91929

akhudek commented 1 year ago

Dang. Ok I'll find some time next week to take a look. I haven't updated to that version yet.

MichaelB2018 commented 1 year ago

Thanks. I thought this was simply a task of changing init.py:

from

    hass.config_entries.async_setup_platforms(entry, PLATFORMS)

to

   hass.config_entries.async_forward_entry_setup(entry, PLATFORMS)

But although that does not give an error message anymore, it's not working either. So I didn't get any further than this yet

MichaelB2018 commented 1 year ago

ah... got it... You need to change line 56 from

    hass.config_entries.async_setup_platforms(entry, PLATFORMS)

to

    await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)

and now it works again.

akhudek commented 1 year ago

Nice! Did you want to do a PR? Otherwise I'll try these fixes during the week. Thanks for figuring it out!

MichaelB2018 commented 1 year ago

Sure - sent you a pull request. Thanks for creating this add-on!

akhudek commented 1 year ago

Works for me too! Thanks for the update. I can't take credit for creating the add-on, just packaging it as a custom component. :)

apple-ihack-geek commented 1 year ago

This works for me as well, glad you fixed it. Let me know if you guys have any questions.