Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Significantly reduce the number of API calls that the august integration #31685
This is a followup to PR #31558
It seems that the folks at August were not so thrilled with the number of API calls unofficial integrations were making, which likely lead to the implementation of the HTTP 429s.
The goal is to make home assistant more sustainable for August, and reduce the amount of load on their servers as much as possible. The hope is that there isn’t any need for them to do any more disruptive rate-limiting, and the component stays working for everyone.
Type of change
Example entry for
@@ Coverage Diff @@ ## dev #31685 +/- ## ========================================== + Coverage 94.64% 94.65% +0.01% ========================================== Files 756 762 +6 Lines 54808 55017 +209 ========================================== + Hits 51872 52077 +205 - Misses 2936 2940 +4
makes. The poll interval for the lock status API is now 15 minutes instead of every 10 seconds because we can use the activity API to see changes in lock state. The interval for the activity API is 10 seconds which allows for the same frequency of state monitoring without all the additional API calls. With four locks, this change results in an ~80% reduction in the number of API calls. The result of the lock and unlock APIs now update the lock state instead of waiting for the next poll. This change also has the added benefit of making the UI appear far more responsive.
As soon as this one is worked out, I have another few to submit on top of this.