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
This commit is contained in:
covid10 2021-12-11 13:23:31 +01:00 committed by GitHub
commit 21f088e825
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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}