From bfba2d7f722b2bacc221f9da3d4beba4b7e1417a Mon Sep 17 00:00:00 2001 From: Sefi Ninio Date: Thu, 16 Dec 2021 18:10:31 +0200 Subject: [PATCH] fix deprecated device_state_attributes Replace `device_state_attributes` with `extra_state_attributes` This fixes #662 --- custom_components/localtuya/switch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/localtuya/switch.py b/custom_components/localtuya/switch.py index d3e08f5..f43d910 100644 --- a/custom_components/localtuya/switch.py +++ b/custom_components/localtuya/switch.py @@ -48,7 +48,7 @@ class LocaltuyaSwitch(LocalTuyaEntity, SwitchEntity): return self._state @property - def device_state_attributes(self): + def extra_state_attributes(self): """Return device state attributes.""" attrs = {} if self.has_config(CONF_CURRENT):