Significantly reduce code in august integration (#32030)

* Significantly reduce code in august integration

* Activity updates can now be processed by py-august
  this allows us to eliminate the activity sync
  code for the door sensors and locks

* Lock and door state can now be consumed from
  the lock detail api which allows us to
  remove the status call apis and reduce
  the number of API calls to august

* Refactor the testing method for locks (part #1)

* Update homeassistant/components/august/binary_sensor.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Switch to asynctest instead of unittest for mock.patch

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
This commit is contained in:
J. Nick KostonandPaulus Schoutsen authored and GitHub committed 2020-02-20 21:06:24 -08:00
1 parent a12c4da0ca
commit d4075fb262
17 files changed
+579 -429

No files matched your search

-1
View File
@@ -128,7 +128,6 @@ def _create_august_data_with_lock_details(lock_details):
authenticator = _mock_august_authenticator()
token_refresh_lock = MagicMock()
api = MagicMock()
api.get_lock_status = MagicMock(return_value=(MagicMock(), MagicMock()))
api.get_lock_detail = MagicMock(side_effect=lock_details)
api.get_operable_locks = MagicMock(return_value=locks)
api.get_doorbells = MagicMock(return_value=[])