fix deprecated device_state_attributes

Replace `device_state_attributes` with `extra_state_attributes`
This fixes #662
This commit is contained in:
Sefi Ninio
2021-12-16 18:10:31 +02:00
parent 76b86eb6e1
commit bfba2d7f72

View File

@@ -48,7 +48,7 @@ class LocaltuyaSwitch(LocalTuyaEntity, SwitchEntity):
return self._state return self._state
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return device state attributes.""" """Return device state attributes."""
attrs = {} attrs = {}
if self.has_config(CONF_CURRENT): if self.has_config(CONF_CURRENT):