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

@ -78,9 +78,14 @@ class BlinkSensor(SensorEntity):
def update(self) -> None:
"""Retrieve sensor data from the camera."""
self.data.refresh()
try:
self._attr_native_value = self._camera.attributes[self._sensor_key]
_LOGGER.debug(
"'%s' %s = %s",
self._camera.attributes["name"],
self._sensor_key,
self._attr_native_value,
)
except KeyError:
self._attr_native_value = None
_LOGGER.error(