mirror of
https://github.com/home-assistant/core.git
synced 2025-07-14 00:37:13 +00:00
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
@ -111,6 +111,11 @@ class ZWaveSensor(ZWaveDeviceEntity, Entity):
|
|||||||
""" Returns the state of the sensor. """
|
""" Returns the state of the sensor. """
|
||||||
return self._value.data
|
return self._value.data
|
||||||
|
|
||||||
|
@property
|
||||||
|
def state_attributes(self):
|
||||||
|
""" Returns optional state attributes. """
|
||||||
|
return self.device_state_attributes
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def unit_of_measurement(self):
|
def unit_of_measurement(self):
|
||||||
return self._value.units
|
return self._value.units
|
||||||
|
@ -255,8 +255,8 @@ class ZWaveDeviceEntity:
|
|||||||
return object_id
|
return object_id
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def state_attributes(self):
|
def device_state_attributes(self):
|
||||||
""" Returns the state attributes. """
|
""" Returns device specific state attributes. """
|
||||||
attrs = {
|
attrs = {
|
||||||
ATTR_NODE_ID: self._value.node.node_id,
|
ATTR_NODE_ID: self._value.node.node_id,
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user