mirror of
https://github.com/home-assistant/core.git
synced 2025-07-09 14:27:07 +00:00
Use dict instead of MutableMapping [extra_state_attributes] (#115319)
This commit is contained in:
parent
968de08e4b
commit
d8c8d1a297
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from collections.abc import Callable, MutableMapping
|
from collections.abc import Callable
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
@ -37,7 +37,7 @@ class MinecraftServerSensorEntityDescription(SensorEntityDescription):
|
|||||||
"""Class describing Minecraft Server sensor entities."""
|
"""Class describing Minecraft Server sensor entities."""
|
||||||
|
|
||||||
value_fn: Callable[[MinecraftServerData], StateType]
|
value_fn: Callable[[MinecraftServerData], StateType]
|
||||||
attributes_fn: Callable[[MinecraftServerData], MutableMapping[str, Any]] | None
|
attributes_fn: Callable[[MinecraftServerData], dict[str, Any]] | None
|
||||||
supported_server_types: set[MinecraftServerType]
|
supported_server_types: set[MinecraftServerType]
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ from __future__ import annotations
|
|||||||
from abc import ABCMeta
|
from abc import ABCMeta
|
||||||
import asyncio
|
import asyncio
|
||||||
from collections import deque
|
from collections import deque
|
||||||
from collections.abc import Callable, Coroutine, Iterable, Mapping, MutableMapping
|
from collections.abc import Callable, Coroutine, Iterable, Mapping
|
||||||
import dataclasses
|
import dataclasses
|
||||||
from enum import Enum, IntFlag, auto
|
from enum import Enum, IntFlag, auto
|
||||||
import functools as ft
|
import functools as ft
|
||||||
@ -537,7 +537,7 @@ class Entity(
|
|||||||
_attr_entity_picture: str | None = None
|
_attr_entity_picture: str | None = None
|
||||||
_attr_entity_registry_enabled_default: bool
|
_attr_entity_registry_enabled_default: bool
|
||||||
_attr_entity_registry_visible_default: bool
|
_attr_entity_registry_visible_default: bool
|
||||||
_attr_extra_state_attributes: MutableMapping[str, Any]
|
_attr_extra_state_attributes: dict[str, Any]
|
||||||
_attr_force_update: bool
|
_attr_force_update: bool
|
||||||
_attr_icon: str | None
|
_attr_icon: str | None
|
||||||
_attr_name: str | None
|
_attr_name: str | None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user