'Update lock status.'

def update(self):

    if ((time() - self._change_timestamp) < 10):
        return
    hub.update_overview()
    status = hub.get_first("$.doorLockStatusList[?(@.deviceLabel=='%s')].lockedState", self._device_label)
    if (status == 'UNLOCKED'):
        self._state = STATE_UNLOCKED
    elif (status == 'LOCKED'):
        self._state = STATE_LOCKED
    elif (status != 'PENDING'):
        _LOGGER.error('Unknown    lock    state    %s', status)
    self._changed_by = hub.get_first("$.doorLockStatusList[?(@.deviceLabel=='%s')].userString", self._device_label)
