From 8cf5ca0ba81f187e56089d4a265e2a2cc1b5ada4 Mon Sep 17 00:00:00 2001 From: Lukas Hetzenecker Date: Thu, 4 Feb 2016 02:12:33 +0100 Subject: [PATCH] Regression: The device specific attributes of ZWave devices got lost. Light and ZWaveDeviceEntity both have overwritten the property state_attributes This includes the device specific attributes in the state_attributes again --- homeassistant/components/sensor/zwave.py | 5 +++++ homeassistant/components/zwave.py | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/sensor/zwave.py b/homeassistant/components/sensor/zwave.py index f28daa5b9e4..9cad0c41d99 100644 --- a/homeassistant/components/sensor/zwave.py +++ b/homeassistant/components/sensor/zwave.py @@ -99,6 +99,11 @@ class ZWaveSensor(ZWaveDeviceEntity, Entity): """ Returns the state of the sensor. """ return self._value.data + @property + def state_attributes(self): + """ Returns optional state attributes. """ + return self.device_state_attributes + @property def unit_of_measurement(self): return self._value.units diff --git a/homeassistant/components/zwave.py b/homeassistant/components/zwave.py index a46918353ec..4daecd8a144 100644 --- a/homeassistant/components/zwave.py +++ b/homeassistant/components/zwave.py @@ -255,8 +255,8 @@ class ZWaveDeviceEntity: return object_id @property - def state_attributes(self): - """ Returns the state attributes. """ + def device_state_attributes(self): + """ Returns device specific state attributes. """ attrs = { ATTR_NODE_ID: self._value.node.node_id, }