fsaris / home-assistant-awox

AwoX mesh light integration for Home Assistant
MIT License
83 stars 23 forks source link

Problem since Home Assistant Update #95

Closed patpac9 closed 1 year ago

patpac9 commented 1 year ago

Here is the Log output I got:

1st: ERROR Error setting up entry AwoX Smart Connect for awox 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/awox/init.py", line 38, in async_setup_entry hass.config_entries.async_setup_platforms(entry, PLATFORMS) AttributeError: 'ConfigEntries' object has no attribute 'async_setup_platforms'

2nd Warning [lddAkip4] Command failed, retry 1 [lddAkip4] Command failed, retry 2 [lddAkip4] Command failed, retry 3

3rd Error Error fetching awox data: No device connected

OkOtChA666 commented 1 year ago

Same

patpac9 commented 1 year ago

Just realized that this is deprecated.

--> async_setup_platforms

Maybe This can help? https://community.home-assistant.io/t/async-setup-platforms-deprecated/529444

I went back to 2023.4.6 it works again.

Also had some issues with the new voice assistant functions in the new 2023.5 Version. It just stops sending entities to Alexa... but that's a whole other topic for other people :D

OkOtChA666 commented 1 year ago

Just realized that this is deprecated.

--> async_setup_platforms

Maybe This can help? https://community.home-assistant.io/t/async-setup-platforms-deprecated/529444

I went back to 2023.4.6 it works again.

Also had some issues with the new voice assistant functions in the new 2023.5 Version. It just stops sending entities to Alexa... but that's a whole other topic for other people :D

I've also downgrade...

michalpulda commented 1 year ago

I have migrated to the ESPHome based solution yesterday. So far it work super reliably.

I run it on ESP32U with external antenna. I have followed the example yaml config and had it deployed in no time. Don't use the api: in the yaml config, since it was causing constant re-connections to the MQTT server for me.

fsaris commented 1 year ago

Okay some changes are needed indeed https://developers.home-assistant.io/blog/2022/07/08/config_entry_forwards/

I'm open for PR's. Not sure when/if I find time soon to update this

fvoigt commented 1 year ago

Hi all, i replaced the old setup line in the __init___.py with following:

load_ok = all(                                                                                              
        await asyncio.gather(                                                                                   
            *[                                                       
                hass.config_entries.async_forward_entry_setup(entry, component)
                for component in PLATFORMS                                     
            ]                                                                  
        )                                                                      
    )  

as i'm not a Py dev and thats my first try i would like someone to review and perhaps add that. It was working on my awox Lights.

OkOtChA666 commented 1 year ago

Hi all, i replaced the old setup line in the init_.py with following:

load_ok = all(                                                                                              
        await asyncio.gather(                                                                                   
            *[                                                       
                hass.config_entries.async_forward_entry_setup(entry, component)
                for component in PLATFORMS                                     
            ]                                                                  
        )                                                                      
    )  

as i'm not a Py dev and thats my first try i would like someone to review and perhaps add that. It was working on my awox Lights.

Can you be more specifi... What line did you replaced

fvoigt commented 1 year ago

The line which is depricated as fsaris mention in the comment before. https://developers.home-assistant.io/blog/2022/07/08/config_entry_forwards/

patpac9 commented 1 year ago

Can confirm it works. Big THANKS to @fvoigt !

I am describing a little bit what has to be done for other Users.

  1. Start VSCode Server Add-on or something else with which you can access the folder Config --> Custom integrations.
  2. Navigate to Config --> Custom Integrations --> awox.
  3. In there you have to open the file: "init.py".
  4. In the File at line 38 is the deprecated code.
  5. Just replace this line with this code below code and it should work. load_ok = all(
    await asyncio.gather(
    *[
    hass.config_entries.async_forward_entry_setup(entry, component) for component in PLATFORMS
    ]
    )
    )
OkOtChA666 commented 1 year ago

Thanks... It works

HerraTee commented 1 year ago

Worked for me too. I had to start Awox app from my phone before the lights were re-enabled, but I'm not sure if it was just a coincidence.

alfo1133 commented 1 year ago

Worked for me too. Big thanks! I had to restart the whole Home Assistant to get the changes to be applied (for those that wouldn't know). ;)

fsaris commented 1 year ago

Should be resolved with latest version https://github.com/fsaris/home-assistant-awox/releases/tag/0.1.5