From 21f088e82576a25ce4fd2795312e0d0bf14155df Mon Sep 17 00:00:00 2001 From: covid10 <71146231+covid10@users.noreply.github.com> Date: Sat, 11 Dec 2021 13:23:31 +0100 Subject: [PATCH] device_state_attributes warnings 2021.12.0b (#230) * device_state_attributes warnings 2021.12.0b Fix for device_state_attributes warnings which began in release 2021.12.0b * device_state_attributes warnings 2021.12.0b Fix for device_state_attributes warnings which began in release 2021.12.0b --- custom_components/adaptive_lighting/switch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/adaptive_lighting/switch.py b/custom_components/adaptive_lighting/switch.py index c07f8b5c..af826196 100755 --- a/custom_components/adaptive_lighting/switch.py +++ b/custom_components/adaptive_lighting/switch.py @@ -703,7 +703,7 @@ class AdaptiveSwitch(SwitchEntity, RestoreEntity): return self._icon @property - def device_state_attributes(self) -> Dict[str, Any]: + def extra_state_attributes(self) -> Dict[str, Any]: """Return the attributes of the switch.""" if not self.is_on: return {key: None for key in self._settings}