tomeko12 / pyelectroluxconnect

A python module to communicate with Elecrolux Connectivity Platform
Apache License 2.0
25 stars 9 forks source link

Electrolux unstable API - possibility of retries and backoffs? #19

Open LordMike opened 9 months ago

LordMike commented 9 months ago

Hi

I'm using this library through an integration in Home Assistant - and we're seeing a lot of "dropouts" where the status of entities will disappear only to reappear a few minutes later. This happens regularly throughout the day.

My theory is that there are no retries anywhere in either that plugin, or this library. So any failed request will lead to this behaviour.

Having little to no python experience - would it be possible to add retries to this library in the HTTP request method, such that it will retry N times (f.ex. 2), with some backoff time (f.ex. 10 seconds and 60 seconds) ?

Thanks in advance. Mike.