Exemple #1
0
    def update(self):
        """ Update lock status """
        verisure.update_lock()

        if verisure.LOCK_STATUS[self._id].status == 'unlocked':
            self._state = STATE_UNLOCKED
        elif verisure.LOCK_STATUS[self._id].status == 'locked':
            self._state = STATE_LOCKED
        elif verisure.LOCK_STATUS[self._id].status != 'pending':
            _LOGGER.error('Unknown lock state %s',
                          verisure.LOCK_STATUS[self._id].status)
Exemple #2
0
    def update(self):
        """ Update lock status """
        verisure.update_lock()

        if verisure.LOCK_STATUS[self._id].status == 'unlocked':
            self._state = STATE_UNLOCKED
        elif verisure.LOCK_STATUS[self._id].status == 'locked':
            self._state = STATE_LOCKED
        elif verisure.LOCK_STATUS[self._id].status != 'pending':
            _LOGGER.error(
                'Unknown lock state %s',
                verisure.LOCK_STATUS[self._id].status)
Exemple #3
0
 def lock(self, **kwargs):
     """ Send lock command. """
     verisure.MY_PAGES.lock.set(kwargs[ATTR_CODE], self._id, 'LOCKED')
     _LOGGER.info('verisure doorlock locking')
     verisure.MY_PAGES.lock.wait_while_pending()
     verisure.update_lock()
Exemple #4
0
 def lock(self, **kwargs):
     """ Send lock command. """
     verisure.MY_PAGES.lock.set(kwargs[ATTR_CODE], self._id, 'LOCKED')
     _LOGGER.info('verisure doorlock locking')
     verisure.MY_PAGES.lock.wait_while_pending()
     verisure.update_lock()