Ekman / home-assistant-pure-i9

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

Assume next state #18

Closed Ekman closed 3 years ago

Ekman commented 3 years ago

There's a delay between sending a command and polling data from the Pure i9. When we send a command, the next poll will report the old state. It's a shame because the Pure i9 will respond with the "next state" in the API call of the send command, but purei9_unofficial does not take that into account. If we'd just read the response we'd get the next proper state.

Therefore, for now, until the Pure i9 API code has been updated, we'll assume that whatever command we send will be successful and we'll assume the state. This works fine unless you're hammering the start, pause, stop, return to dock buttons back-and-forth. But after all it's just an assumed state so that can be considered an error margin.