mirror of
https://github.com/home-assistant/core.git
synced 2025-07-10 14:57:09 +00:00
Remove entity description mixin in Roomba (#112932)
This commit is contained in:
parent
a1a0738e58
commit
22f6558647
@ -27,20 +27,13 @@ from .irobot_base import IRobotEntity
|
|||||||
from .models import RoombaData
|
from .models import RoombaData
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True, kw_only=True)
|
||||||
class RoombaSensorEntityDescriptionMixin:
|
class RoombaSensorEntityDescription(SensorEntityDescription):
|
||||||
"""Mixin for describing Roomba data."""
|
"""Immutable class for describing Roomba data."""
|
||||||
|
|
||||||
value_fn: Callable[[IRobotEntity], StateType]
|
value_fn: Callable[[IRobotEntity], StateType]
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
|
||||||
class RoombaSensorEntityDescription(
|
|
||||||
SensorEntityDescription, RoombaSensorEntityDescriptionMixin
|
|
||||||
):
|
|
||||||
"""Immutable class for describing Roomba data."""
|
|
||||||
|
|
||||||
|
|
||||||
SENSORS: list[RoombaSensorEntityDescription] = [
|
SENSORS: list[RoombaSensorEntityDescription] = [
|
||||||
RoombaSensorEntityDescription(
|
RoombaSensorEntityDescription(
|
||||||
key="battery",
|
key="battery",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user