* Refresh the august access token
when needed.
Currently august will stop working when the token
expires about every six month.
This resolves issue #23788
* Make refresh_access_token_if_needed private since we do not want additional callers
* Add init
As polling for lock status is every 15 minutes,
we read lock and unlock events from the activity log.
An upstream update of py-august was needed to
expose the door open and close events.
Door open and close events are now seen within
a few seconds instead of delayed 15+ minutes.
* Significantly reduce the number of API calls that the august integration
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.
* Convert to using UTC times
* working unique ids for august
* cleanup blank lines
* cleanup blank lines
* cleanup blank lines
* rebase
* get the oneline back in
* blank line stuff
* whitespace cleanup
* Blank Line .
* blank line again
The available state for the August Doorbell is currently set based on the state of the binary ding sensor. This means that if there is no door bell rings in a while on startup the doorbell is shown as Unavailable (#20421) . This ties the availability of the doorbell to the actual online state thats in the device information retrieved from august so that even if there has not been a doorbell ring activity on a while the device shows as online when it is.