56abc7f9b4c7f2ba21b73b51e1df573adfd36d47,homeassistant/components/lock/zwave.py,ZwaveLock,update_properties,#ZwaveLock#,222

Before Change



    def update_properties(self):
        Callback on data changes for node values.
        self._state = self._value.data
        _LOGGER.debug("Lock state set from Bool value and"
                      " is %s", self._state)
        notification_data = self.get_value(class_id=zwave.const
                                           .COMMAND_CLASS_ALARM,
                                           label=["Access Control"],
                                           member="data")
        if notification_data:
            self._notification = LOCK_NOTIFICATION.get(str(notification_data))
        if self._v2btze:
            advanced_config = self.get_value(class_id=zwave.const
                                             .COMMAND_CLASS_CONFIGURATION,
                                             index=12,
                                             data=CONFIG_ADVANCED,
                                             member="data")
            if advanced_config:
                self._state = LOCK_STATUS.get(str(notification_data))
                _LOGGER.debug("Lock state set from Access Control "
                              "value and is %s, get=%s",
                              str(notification_data),
                              self.state)

        alarm_type = self.get_value(class_id=zwave.const
                                    .COMMAND_CLASS_ALARM,
                                    label=["Alarm Type"], member="data")
        _LOGGER.debug("Lock alarm_type is %s", str(alarm_type))
        alarm_level = self.get_value(class_id=zwave.const
                                     .COMMAND_CLASS_ALARM,
                                     label=["Alarm Level"], member="data")
        _LOGGER.debug("Lock alarm_level is %s", str(alarm_level))
        if not alarm_type:
            return
        if alarm_type is 21:

After Change



    def update_properties(self):
        Callback on data changes for node values.
        self._state = self.values.primary.data
        _LOGGER.debug("Lock state set from Bool value and"
                      " is %s", self._state)
        if self.values.access_control:
            notification_data = self.values.access_control.data
            self._notification = LOCK_NOTIFICATION.get(str(notification_data))

            if self._v2btze:
                if self.values.v2btze_advanced and \
                        self.values.v2btze_advanced.data == CONFIG_ADVANCED:
                    self._state = LOCK_STATUS.get(str(notification_data))
                    _LOGGER.debug("Lock state set from Access Control "
                                  "value and is %s, get=%s",
                                  str(notification_data),
                                  self.state)

        if not self.values.alarm_type:
            return

        alarm_type = self.values.alarm_type.data
        _LOGGER.debug("Lock alarm_type is %s", str(alarm_type))
        if self.values.alarm_level:
            alarm_level = self.values.alarm_level.data
        else:
            alarm_level = None
        _LOGGER.debug("Lock alarm_level is %s", str(alarm_level))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 39

Instances


Project Name: home-assistant/home-assistant
Commit Name: 56abc7f9b4c7f2ba21b73b51e1df573adfd36d47
Time: 2017-03-12
Author: adam@armills.info
File Name: homeassistant/components/lock/zwave.py
Class Name: ZwaveLock
Method Name: update_properties


Project Name: home-assistant/home-assistant
Commit Name: 56abc7f9b4c7f2ba21b73b51e1df573adfd36d47
Time: 2017-03-12
Author: adam@armills.info
File Name: homeassistant/components/cover/zwave.py
Class Name: ZwaveRollershutter
Method Name: update_properties


Project Name: home-assistant/home-assistant
Commit Name: 1a7ffdca52fcde3de206009ecd932aceedec2d4d
Time: 2017-03-14
Author: paulus@paulusschoutsen.nl
File Name: homeassistant/components/cover/zwave.py
Class Name: ZwaveRollershutter
Method Name: update_properties


Project Name: home-assistant/home-assistant
Commit Name: 56abc7f9b4c7f2ba21b73b51e1df573adfd36d47
Time: 2017-03-12
Author: adam@armills.info
File Name: homeassistant/components/lock/zwave.py
Class Name: ZwaveLock
Method Name: update_properties