Ekman / home-assistant-pure-i9

Electrolux Pure i9 robot vacuum integration for Home Assistant.
MIT License
25 stars 5 forks source link

Handle unavailable robots on boot #38

Closed Phype closed 1 year ago

Phype commented 2 years ago

It seems that robots which are not connected to the cloud when home assistant starts are not picked up properly.

Today I had to restart home assistant to change the state of my robot from unavailable to docked because it wasn't connected to wifi when home assistant was started.

I'll try to debug this and provide better information.

Ekman commented 2 years ago

Thanks for reporting!

I'll test this myself and get back to you.

I know that the API is fairly slow to update the state of the robot. That's the reason for the integration assuming the next state when doing something, eg. when starting a cleaning the library will assume that the robot has started instead of listening to the API for one polling cycle. Therefore, it happens that states may jump back and forth and eventually settling on the correct state.

The polling interval is 1 minute and it could take a minute or two for the state to settle. However, it should of course settle on the correct state eventually.

Ekman commented 1 year ago

I've released a new version of the integration 1.3.1 that changes how the integration fetches and updates data from the API. For instance, the integration will no longer assume the next state, it should better handle that naturally now.

I'm closing this issue but if you still observe this bug then feel free to comment and I'll re-open it.