Clean up state_attributes vs device_state_attributes
This commit is contained in:
1 parent
681b84e1bd
commit
f08b77dc4c
23 files changed
+66
-138
No files matched your search
@@ -129,11 +129,6 @@ class SwitchDevice(ToggleEntity):
|
||||
""" Is the device in standby. """
|
||||
return None
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
""" Returns device specific state attributes. """
|
||||
return None
|
||||
|
||||
@property
|
||||
def state_attributes(self):
|
||||
""" Returns optional state attributes. """
|
||||
@@ -144,9 +139,4 @@ class SwitchDevice(ToggleEntity):
|
||||
if value:
|
||||
data[attr] = value
|
||||
|
||||
device_attr = self.device_state_attributes
|
||||
|
||||
if device_attr is not None:
|
||||
data.update(device_attr)
|
||||
|
||||
return data
|
||||
Reference in new issue
Block a user