jdejaegh/irm-kmi-ha

Improve API timeouts handling

jdejaegh opened this issue · 0 comments

Currently, when the API times out, Home Assistant shows all the sensors as 'unavailable' until the next successful refresh. As the polling interval is 7 minutes, it means that the sensors are 'unavailable' a multiple of 7 minutes.

Things to investigate to improve that:

  • Keep the existing data and do not make the sensor become unavailable immediately (wait 2 or 3 failed updates before doing so)
  • Increase the timeout limit on the client side
  • Retry sooner than the default polling interval if the last request timed out (may not be nice to the API)

Linked to #21