diff --git a/homeassistant/components/climate/zwave.py b/homeassistant/components/climate/zwave.py index fc2e8736ee9..a2d809ee239 100755 --- a/homeassistant/components/climate/zwave.py +++ b/homeassistant/components/climate/zwave.py @@ -68,7 +68,7 @@ class ZWaveClimate(ZWaveDeviceEntity, ClimateDevice): self._unit = temp_unit _LOGGER.debug("temp_unit is %s", self._unit) self._zxt_120 = None - self.update_properties() + self.update() # Make sure that we have values for the key before converting to int if (value.node.manufacturer_id.strip() and value.node.product_id.strip()): @@ -80,8 +80,8 @@ class ZWaveClimate(ZWaveDeviceEntity, ClimateDevice): " workaround") self._zxt_120 = 1 - def update_properties(self): - """Callback on data changes for node values.""" + def update(self): + """Get the current state of the entity.""" # Operation Mode for value in self._node.get_values( class_id=zwave.const.COMMAND_CLASS_THERMOSTAT_MODE).values(): diff --git a/homeassistant/components/cover/zwave.py b/homeassistant/components/cover/zwave.py index d9d33942e15..2805a88440c 100644 --- a/homeassistant/components/cover/zwave.py +++ b/homeassistant/components/cover/zwave.py @@ -70,8 +70,8 @@ class ZwaveRollershutter(zwave.ZWaveDeviceEntity, CoverDevice): _LOGGER.debug("Controller without positioning feedback") self._workaround = 1 - def update_properties(self): - """Callback on data changes for node values.""" + def update(self): + """Get the current state of the entity.""" # Position value for value in self._node.get_values( class_id=zwave.const.COMMAND_CLASS_SWITCH_MULTILEVEL).values(): diff --git a/homeassistant/components/light/zwave.py b/homeassistant/components/light/zwave.py index ab6cb3cdecd..6183b189089 100644 --- a/homeassistant/components/light/zwave.py +++ b/homeassistant/components/light/zwave.py @@ -108,7 +108,7 @@ class ZwaveDimmer(zwave.ZWaveDeviceEntity, Light): _LOGGER.debug("AEOTEC ZW098 workaround enabled") self._zw098 = 1 - self.update_properties() + self.update() # Used for value change event handling self._refreshing = False @@ -116,7 +116,7 @@ class ZwaveDimmer(zwave.ZWaveDeviceEntity, Light): _LOGGER.debug('self._refreshing=%s self.delay=%s', self._refresh_value, self._delay) - def update_properties(self): + def update(self): """Update internal properties based on zwave values.""" # Brightness self._brightness, self._state = brightness_state(self._value) @@ -126,7 +126,7 @@ class ZwaveDimmer(zwave.ZWaveDeviceEntity, Light): if self._refresh_value: if self._refreshing: self._refreshing = False - self.update_properties() + self.schedule_update_ha_state(True) else: def _refresh_value(): """Used timer callback for delayed value refresh.""" @@ -138,10 +138,9 @@ class ZwaveDimmer(zwave.ZWaveDeviceEntity, Light): self._timer = Timer(self._delay, _refresh_value) self._timer.start() - self.schedule_update_ha_state() + self.schedule_update_ha_state() else: - self.update_properties() - self.schedule_update_ha_state() + self.schedule_update_ha_state(True) @property def brightness(self): @@ -227,7 +226,7 @@ class ZwaveColorLight(ZwaveDimmer): _LOGGER.debug("Zwave node color values found.") dispatcher.disconnect( self._value_added, ZWaveNetwork.SIGNAL_VALUE_ADDED) - self.update_properties() + self.update() def _value_added(self, value): """Called when a value has been added to the network.""" @@ -236,9 +235,9 @@ class ZwaveColorLight(ZwaveDimmer): # Check for the missing color values self._get_color_values() - def update_properties(self): + def update(self): """Update internal properties based on zwave values.""" - super().update_properties() + super().update() if self._value_color is None: return diff --git a/homeassistant/components/lock/zwave.py b/homeassistant/components/lock/zwave.py index 1947714804d..4140c137de0 100644 --- a/homeassistant/components/lock/zwave.py +++ b/homeassistant/components/lock/zwave.py @@ -112,10 +112,10 @@ class ZwaveLock(zwave.ZWaveDeviceEntity, LockDevice): self._state = None self._notification = None self._lock_status = None - self.update_properties() + self.update() - def update_properties(self): - """Callback on data changes for node values.""" + def update(self): + """Get the current state of the entity.""" for value in self._node.get_values( class_id=zwave.const.COMMAND_CLASS_ALARM).values(): if value.label != "Access Control": diff --git a/homeassistant/components/zwave/__init__.py b/homeassistant/components/zwave/__init__.py index c4b51ca9451..e2863e477ec 100755 --- a/homeassistant/components/zwave/__init__.py +++ b/homeassistant/components/zwave/__init__.py @@ -624,12 +624,7 @@ class ZWaveDeviceEntity(Entity): def value_changed(self, value): """Called when a value for this entity's node has changed.""" - self.update_properties() - self.schedule_update_ha_state() - - def update_properties(self): - """Callback on data changes for node values.""" - pass + self.schedule_update_ha_state(True) @property def should_poll(self):