zwave refactor, don't use ozw values directly in properties. (#5961)

* First round of not using values directly

* Round two

* lint

* Round four

* Conflict

* Round five

* Update zwave.py

* round six

* Docstring

* flakywakie

* Fetch values in constructor

* Blank line removal

* Set attributes in callback

* Docstring

* Round seven

* Ughgit add homeassistant/components/lock/zwave.py!

* Sloppy code
This commit is contained in:
John Arild Berentsen authored and Paulus Schoutsen committed 2017-02-17 23:56:05 -08:00
1 parent c1eed148cc
commit 799fbe42f8
8 files changed
+78 -76

No files matched your search

+1 -5
View File
@@ -234,11 +234,7 @@ class ZwaveLock(zwave.ZWaveDeviceEntity, LockDevice):
def update_properties(self):
"""Callback on data changes for node values."""
self._state = self.get_value(class_id=zwave
.const.COMMAND_CLASS_DOOR_LOCK,
type=zwave.const.TYPE_BOOL,
genre=zwave.const.GENRE_USER,
member='data')
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