continue
self._notification = LOCK_NOTIFICATION.get(value.data)
if self._notification:
self._state = LOCK_STATUS.get(value.data)
_LOGGER.debug("Lock state set from Access Control value and"
" is %s", value.data)
break
for value in self._node.get_values(
class_id=zwave.const.COMMAND_CLASS_ALARM).values():
if value.label != "Alarm Type":
continue
alarm_type = LOCK_ALARM_TYPE.get(value.data)
if alarm_type:
self._state = LOCK_STATUS.get(value.data)
_LOGGER.debug("Lock state set from Alarm Type value and"
" is %s", value.data)
break
for value in self._node.get_values(
class_id=zwave.const.COMMAND_CLASS_ALARM).values():
if value.label != "Alarm Level":
continue
alarm_level = value.data
_LOGGER.debug("Lock alarm_level is %s", alarm_level)
if alarm_type is 21:
self._lock_status = "{}{}".format(
LOCK_ALARM_TYPE.get(alarm_type),
MANUAL_LOCK_ALARM_LEVEL.get(alarm_level))
if alarm_type in ALARM_TYPE_STD:
self._lock_status = "{}{}".format(
LOCK_ALARM_TYPE.get(alarm_type), alarm_level)
break
if alarm_type is 161:
self._lock_status = "{}{}".format(
LOCK_ALARM_TYPE.get(alarm_type),
TAMPER_ALARM_LEVEL.get(alarm_level))
break
if alarm_type != 0:
self._lock_status = LOCK_ALARM_TYPE.get(alarm_type)
break
if not self._notification and not self._lock_status:
for value in self._node.get_values(
class_id=zwave.const.COMMAND_CLASS_DOOR_LOCK).values():
if value.type != zwave.const.TYPE_BOOL:
continue
if value.genre != zwave.const.GENRE_USER:
continue
self._state = value.data
_LOGGER.debug("Lock state set from Bool value and"
" is %s", value.data)
break