Add save clips to Blink services (#84149)

This commit is contained in:
Brent Perdue 2023-06-01 14:06:53 -04:00 committed by GitHub
parent a1a055f618
commit 23ca26ae56
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 90 additions and 9 deletions

View file

@ -55,8 +55,15 @@ class BlinkSyncModule(AlarmControlPanelEntity):
def update(self) -> None:
"""Update the state of the device."""
_LOGGER.debug("Updating Blink Alarm Control Panel %s", self._name)
self.data.refresh()
if self.data.check_if_ok_to_update():
_LOGGER.debug(
"Initiating a blink.refresh() from BlinkSyncModule('%s') (%s)",
self._name,
self.data,
)
self.data.refresh()
_LOGGER.info("Updating State of Blink Alarm Control Panel '%s'", self._name)
self._attr_state = (
STATE_ALARM_ARMED_AWAY if self.sync.arm else STATE_ALARM_DISARMED
)