Centralize august activity updates (#32197)

* Reduce August doorbell detail updates

* Doorbell images now get updates from the activity feed

* Tests for activity updates

* py-august now provides bridge_is_online for available state

* py-august now provides is_standby for available state

* py-august now provides get_doorbell_image (eliminate requests)

* remove debug

* black after merge conflict

* Centralize august activity updates

* Updates appear significantly more responsive

* Should address the community complaints about "lag"

* Reduce detail updates (device end points) to one hour interval

* Signal entities to update via dispatcher when new activity arrives

* Resolves out of sync state (skipped test is now unskipped)

* pylint

* fix merge conflict

* review comments

* Remove stray

* Address review items that can be done without refactor
This commit is contained in:
J. Nick Koston authored and GitHub committed 2020-02-26 18:48:44 -08:00
1 parent d207c37c33
commit 4c5e364d90
9 files changed
+352 -117

No files matched your search

+2 -3
View File
@@ -1,11 +1,10 @@
"""Support for August sensors."""
from datetime import timedelta
import logging
from homeassistant.components.sensor import DEVICE_CLASS_BATTERY
from homeassistant.helpers.entity import Entity
from .const import DATA_AUGUST, DEFAULT_NAME, DOMAIN
from .const import DATA_AUGUST, DEFAULT_NAME, DOMAIN, MIN_TIME_BETWEEN_DETAIL_UPDATES
BATTERY_LEVEL_FULL = "Full"
BATTERY_LEVEL_MEDIUM = "Medium"
@@ -13,7 +12,7 @@ BATTERY_LEVEL_LOW = "Low"
_LOGGER = logging.getLogger(__name__)
SCAN_INTERVAL = timedelta(seconds=5)
SCAN_INTERVAL = MIN_TIME_BETWEEN_DETAIL_UPDATES
def _retrieve_device_battery_state(detail):