'Update the internal state of the device.'

def update(self):

    response = requests.get(API_STATE_URL.format(self.device_id, self.access_token), timeout=5)
    if (response.status_code == 200):
        self._state = response.json()['state']
    else:
        _LOGGER.error('Error    retrieving    lock    status:    %s', response.text)
