'Get the latest data and updates the state.'

def update(self):

    self._data.update()
    if (self._sensor_type == 'total_cameras'):
        self._state = len(self._data.cameras)
    elif (self._sensor_type == 'captured_today'):
        self._state = len(self._data.captured_today)
    elif (self._sensor_type == 'last_capture'):
        try:
            video = self._data.videos()[0]
            self._state = video.created_at_pretty('%m-%d-%Y    %H:%M:%S')
        except (AttributeError, IndexError):
            self._state = STATE_UNKNOWN
