mirror of
https://github.com/home-assistant/core
synced 2024-10-14 21:47:16 +00:00
Remove device_state_attributes property from entity base class (#105650)
This commit is contained in:
parent
9020dbb093
commit
0ec3a222e3
|
@ -540,15 +540,6 @@ class Entity(ABC):
|
||||||
"""
|
"""
|
||||||
return None
|
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
|
@property
|
||||||
def extra_state_attributes(self) -> Mapping[str, Any] | None:
|
def extra_state_attributes(self) -> Mapping[str, Any] | None:
|
||||||
"""Return entity specific state attributes.
|
"""Return entity specific state attributes.
|
||||||
|
|
|
@ -587,10 +587,6 @@ _ENTITY_MATCH: list[TypeHintMatch] = [
|
||||||
function_name="state_attributes",
|
function_name="state_attributes",
|
||||||
return_type=["dict[str, Any]", None],
|
return_type=["dict[str, Any]", None],
|
||||||
),
|
),
|
||||||
TypeHintMatch(
|
|
||||||
function_name="device_state_attributes",
|
|
||||||
return_type=["Mapping[str, Any]", None],
|
|
||||||
),
|
|
||||||
TypeHintMatch(
|
TypeHintMatch(
|
||||||
function_name="extra_state_attributes",
|
function_name="extra_state_attributes",
|
||||||
return_type=["Mapping[str, Any]", None],
|
return_type=["Mapping[str, Any]", None],
|
||||||
|
|
Loading…
Reference in a new issue