Remove entity description mixin in Roomba (#112932)
This commit is contained in:
parent
a1a0738e58
commit
22f6558647
1 changed files with 3 additions and 10 deletions
|
@ -27,20 +27,13 @@ from .irobot_base import IRobotEntity
|
|||
from .models import RoombaData
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class RoombaSensorEntityDescriptionMixin:
|
||||
"""Mixin for describing Roomba data."""
|
||||
@dataclass(frozen=True, kw_only=True)
|
||||
class RoombaSensorEntityDescription(SensorEntityDescription):
|
||||
"""Immutable class for describing Roomba data."""
|
||||
|
||||
value_fn: Callable[[IRobotEntity], StateType]
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class RoombaSensorEntityDescription(
|
||||
SensorEntityDescription, RoombaSensorEntityDescriptionMixin
|
||||
):
|
||||
"""Immutable class for describing Roomba data."""
|
||||
|
||||
|
||||
SENSORS: list[RoombaSensorEntityDescription] = [
|
||||
RoombaSensorEntityDescription(
|
||||
key="battery",
|
||||
|
|
Loading…
Add table
Reference in a new issue