Exemplo n.º 1
0
 def _get_health_attrs(self):
     """Return health attributes."""
     if self.family == 'doorbots' or self.family == 'stickup_cams':
         url = API_URI + HEALTH_DOORBELL_ENDPOINT.format(self.account_id)
     elif self.family == 'chimes':
         url = API_URI + HEALTH_CHIMES_ENDPOINT.format(self.account_id)
     self._health_attrs = self._ring.query(url).get('device_health')
Exemplo n.º 2
0
 def update_health_data(self):
     """Update health attrs."""
     self._health_attrs = (
         self._ring.query(HEALTH_DOORBELL_ENDPOINT.format(self.id))
         .json()
         .get("device_health", {})
     )