From 0ec3a222e3686b72c082f177d02a3a0c4cd7d431 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Thu, 14 Dec 2023 08:33:56 +0100 Subject: [PATCH] Remove device_state_attributes property from entity base class (#105650) --- homeassistant/helpers/entity.py | 9 --------- pylint/plugins/hass_enforce_type_hints.py | 4 ---- 2 files changed, 13 deletions(-) diff --git a/homeassistant/helpers/entity.py b/homeassistant/helpers/entity.py index 4a12c012ca14..f19edaf28b92 100644 --- a/homeassistant/helpers/entity.py +++ b/homeassistant/helpers/entity.py @@ -540,15 +540,6 @@ class Entity(ABC): """ return None - @property - def device_state_attributes(self) -> Mapping[str, Any] | None: - """Return entity specific state attributes. - - This method is deprecated, platform classes should implement - extra_state_attributes instead. - """ - return None - @property def extra_state_attributes(self) -> Mapping[str, Any] | None: """Return entity specific state attributes. diff --git a/pylint/plugins/hass_enforce_type_hints.py b/pylint/plugins/hass_enforce_type_hints.py index bd09f4618819..b2620dd3e1e1 100644 --- a/pylint/plugins/hass_enforce_type_hints.py +++ b/pylint/plugins/hass_enforce_type_hints.py @@ -587,10 +587,6 @@ _ENTITY_MATCH: list[TypeHintMatch] = [ function_name="state_attributes", return_type=["dict[str, Any]", None], ), - TypeHintMatch( - function_name="device_state_attributes", - return_type=["Mapping[str, Any]", None], - ), TypeHintMatch( function_name="extra_state_attributes", return_type=["Mapping[str, Any]", None],