homewizard / python-homewizard-energy

HomeWizard Energy API implementation in Python. Designed for Home Assistant but can be used for any Async application.
https://api-documentation.homewizard.com
Apache License 2.0
14 stars 4 forks source link

Retry failed requests with backoff to make unstable connections less flaky #399

Closed DCSBL closed 2 months ago

DCSBL commented 2 months ago

SSIA

Some users have issues with devices that have a weak wifi connection. Via this PR we retry the request a couple of times before responding with an error. This should improve the user experience.

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (5494c5d) to head (f9cb7dd). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #399 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 6 6 Lines 288 290 +2 Branches 27 27 ========================================= + Hits 288 290 +2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.