Merge pull request #1108 from lukas-hetzenecker/regression-zwave-light
Z-Wave Regression: Fix state attributes of lights and switches.
This commit is contained in:
commit
a33f1c61e5
2 files changed
+7
-2
No files matched your search
@@ -111,6 +111,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
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user