mirror of
https://github.com/home-assistant/core.git
synced 2025-07-13 16:27:08 +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. """
|
||||
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,
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user