diff --git a/homeassistant/components/binary_sensor/zwave.py b/homeassistant/components/binary_sensor/zwave.py index b48b4578af9..32de0f653a7 100644 --- a/homeassistant/components/binary_sensor/zwave.py +++ b/homeassistant/components/binary_sensor/zwave.py @@ -99,6 +99,7 @@ class ZWaveBinarySensor(BinarySensorDevice, zwave.ZWaveDeviceEntity, Entity): """Called when a value has changed on the network.""" if self._value.value_id == value.value_id or \ self._value.node == value.node: + _LOGGER.debug('Value changed for label %s', self._value.label) self.schedule_update_ha_state() diff --git a/homeassistant/components/climate/zwave.py b/homeassistant/components/climate/zwave.py index eb3aca7be5b..f7bbe341cf7 100755 --- a/homeassistant/components/climate/zwave.py +++ b/homeassistant/components/climate/zwave.py @@ -89,9 +89,9 @@ class ZWaveClimate(ZWaveDeviceEntity, ClimateDevice): """Called when a value has changed on the network.""" if self._value.value_id == value.value_id or \ self._value.node == value.node: + _LOGGER.debug('Value changed for label %s', self._value.label) self.update_properties() self.schedule_update_ha_state() - _LOGGER.debug("Value changed on network %s", value) def update_properties(self): """Callback on data change for the registered node/value pair.""" diff --git a/homeassistant/components/cover/zwave.py b/homeassistant/components/cover/zwave.py index a190e69bf53..89947e3e4fc 100644 --- a/homeassistant/components/cover/zwave.py +++ b/homeassistant/components/cover/zwave.py @@ -78,9 +78,9 @@ class ZwaveRollershutter(zwave.ZWaveDeviceEntity, CoverDevice): """Called when a value has changed on the network.""" if self._value.value_id == value.value_id or \ self._value.node == value.node: + _LOGGER.debug('Value changed for label %s', self._value.label) self.update_properties() - self.update_ha_state() - _LOGGER.debug("Value changed on network %s", value) + self.schedule_update_ha_state() def update_properties(self): """Callback on data change for the registered node/value pair.""" @@ -170,9 +170,9 @@ class ZwaveGarageDoor(zwave.ZWaveDeviceEntity, CoverDevice): def value_changed(self, value): """Called when a value has changed on the network.""" if self._value.value_id == value.value_id: + _LOGGER.debug('Value changed for label %s', self._value.label) self._state = value.data - self.update_ha_state() - _LOGGER.debug("Value changed on network %s", value) + self.schedule_update_ha_state() @property def is_closed(self): diff --git a/homeassistant/components/light/zwave.py b/homeassistant/components/light/zwave.py index de471db4957..30fa0611e45 100644 --- a/homeassistant/components/light/zwave.py +++ b/homeassistant/components/light/zwave.py @@ -127,6 +127,7 @@ class ZwaveDimmer(zwave.ZWaveDeviceEntity, Light): """Called when a value has changed on the network.""" if self._value.value_id == value.value_id or \ self._value.node == value.node: + _LOGGER.debug('Value changed for label %s', self._value.label) if self._refresh_value: if self._refreshing: self._refreshing = False @@ -142,10 +143,10 @@ class ZwaveDimmer(zwave.ZWaveDeviceEntity, Light): self._timer = Timer(self._delay, _refresh_value) self._timer.start() - self.update_ha_state() + self.schedule_update_ha_state() else: self.update_properties() - self.update_ha_state() + self.schedule_update_ha_state() @property def brightness(self): diff --git a/homeassistant/components/lock/zwave.py b/homeassistant/components/lock/zwave.py index d359cacba8f..17fc30e93cf 100644 --- a/homeassistant/components/lock/zwave.py +++ b/homeassistant/components/lock/zwave.py @@ -76,6 +76,7 @@ class ZwaveLock(zwave.ZWaveDeviceEntity, LockDevice): """Called when a value has changed on the network.""" if self._value.value_id == value.value_id or \ self._value.node == value.node: + _LOGGER.debug('Value changed for label %s', self._value.label) self.update_properties() self.schedule_update_ha_state() diff --git a/homeassistant/components/sensor/zwave.py b/homeassistant/components/sensor/zwave.py index 3a70e0d521f..67e2801974f 100644 --- a/homeassistant/components/sensor/zwave.py +++ b/homeassistant/components/sensor/zwave.py @@ -4,6 +4,7 @@ Interfaces with Z-Wave sensors. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.zwave/ """ +import logging # Because we do not compile openzwave on CI # pylint: disable=import-error from homeassistant.components.sensor import DOMAIN @@ -11,6 +12,8 @@ from homeassistant.components import zwave from homeassistant.const import TEMP_CELSIUS, TEMP_FAHRENHEIT from homeassistant.helpers.entity import Entity +_LOGGER = logging.getLogger(__name__) + def setup_platform(hass, config, add_devices, discovery_info=None): """Setup Z-Wave sensors.""" @@ -72,7 +75,8 @@ class ZWaveSensor(zwave.ZWaveDeviceEntity, Entity): """Called when a value has changed on the network.""" if self._value.value_id == value.value_id or \ self._value.node == value.node: - self.update_ha_state() + _LOGGER.debug('Value changed for label %s', self._value.label) + self.schedule_update_ha_state() class ZWaveMultilevelSensor(ZWaveSensor): diff --git a/homeassistant/components/switch/zwave.py b/homeassistant/components/switch/zwave.py index 4ba9cff378e..2f409f94ef3 100644 --- a/homeassistant/components/switch/zwave.py +++ b/homeassistant/components/switch/zwave.py @@ -4,11 +4,14 @@ Z-Wave platform that handles simple binary switches. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/switch.zwave/ """ +import logging # Because we do not compile openzwave on CI # pylint: disable=import-error from homeassistant.components.switch import DOMAIN, SwitchDevice from homeassistant.components import zwave +_LOGGER = logging.getLogger(__name__) + # pylint: disable=unused-argument def setup_platform(hass, config, add_devices, discovery_info=None): @@ -46,8 +49,9 @@ class ZwaveSwitch(zwave.ZWaveDeviceEntity, SwitchDevice): def _value_changed(self, value): """Called when a value has changed on the network.""" if self._value.value_id == value.value_id: + _LOGGER.debug('Value changed for label %s', self._value.label) self._state = value.data - self.update_ha_state() + self.schedule_update_ha_state() @property def is_on(self):