Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions homeassistant/helpers/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

from abc import ABC
import asyncio
from collections.abc import Mapping
from datetime import datetime, timedelta
import functools as ft
import logging
Expand Down Expand Up @@ -151,7 +152,7 @@ def state(self) -> StateType:
return STATE_UNKNOWN

@property
def capability_attributes(self) -> dict[str, Any] | None:
def capability_attributes(self) -> Mapping[str, Any] | None:
"""Return the capability attributes.

Attributes that explain the capabilities of an entity.
Expand All @@ -171,7 +172,7 @@ def state_attributes(self) -> dict[str, Any] | None:
return None

@property
def device_state_attributes(self) -> dict[str, Any] | None:
def device_state_attributes(self) -> Mapping[str, Any] | None:
"""Return entity specific state attributes.

This method is deprecated, platform classes should implement
Expand All @@ -180,7 +181,7 @@ def device_state_attributes(self) -> dict[str, Any] | None:
return None

@property
def extra_state_attributes(self) -> dict[str, Any] | None:
def extra_state_attributes(self) -> Mapping[str, Any] | None:
"""Return entity specific state attributes.

Implemented by platform classes. Convention for attribute names
Expand All @@ -189,7 +190,7 @@ def extra_state_attributes(self) -> dict[str, Any] | None:
return None

@property
def device_info(self) -> dict[str, Any] | None:
def device_info(self) -> Mapping[str, Any] | None:
"""Return device specific attributes.

Implemented by platform classes.
Expand Down