Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add lock_return_activity and unlock_return_activity apis (additional reduction in august api calls) #39

Merged

Conversation

bdraco
Copy link
Contributor

@bdraco bdraco commented Feb 19, 2020

It is now possible to call the lock and unlock remote operation
and get back a LockOperationActivity that can be consumed by
update_lock_detail_from_activity.  If the lock supports doorsense,
a DoorOperationActivity is also returned since the underlying
August API returns this.

Lock operations now avoid the need to fetch lock details afterward
which further reduces the number of API calls we make to the
August API

bdraco and others added 3 commits February 17, 2020 21:01
In order to reduce the number of api calls we can
now get the door status from the single lock detail
endpoint since it is contained inside the detail api.

Provide sets for the lock status and door state in
the LockDetail so they can be updated with data
from the activity api
Home Assistant checks the activity log far more frequently than other
apis in order to reduce the number of api calls.

The new update_lock_from_activity util provides a way to update a
LockDetail class with one of the following activities:

  LockOperationActivity
  DoorOperationActivity
It is now possible to call the lock and unlock remote operation
and get back a LockOperationActivity that can be consumed by
update_lock_detail_from_activity.  If the lock supports doorsense,
a DoorOperationActivity is also returned since the underlying
August API returns this.

Lock operations now avoid the need to fetch lock details afterward
which further reduces the number of API calls we make to the
August API
@snjoetw snjoetw merged commit f41a3a9 into snjoetw:master Feb 20, 2020
@snjoetw
Copy link
Owner

snjoetw commented Feb 20, 2020

Thanks!

@bdraco
Copy link
Contributor Author

bdraco commented Feb 20, 2020

@snjoetw. Thank you! Would you mind pushing out a new release ?

@snjoetw
Copy link
Owner

snjoetw commented Feb 20, 2020

Yep just released 0.17.0 with this change

@bdraco
Copy link
Contributor Author

bdraco commented Feb 20, 2020

Yep just released 0.17.0 with this change

Thanks again. I'll be able to get ALL of the august home assistant integration API calls trimmed down to only polling the activity frequently and doing the device detail updates far less often with these latest changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants