Remove entity description mixin in Sensibo (#112936)
This commit is contained in:
parent
5f4881cb28
commit
049f0f5e3b
7 changed files with 27 additions and 90 deletions
|
@ -25,34 +25,20 @@ from .entity import SensiboDeviceBaseEntity, SensiboMotionBaseEntity
|
|||
PARALLEL_UPDATES = 0
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class MotionBaseEntityDescriptionMixin:
|
||||
"""Mixin for required Sensibo base description keys."""
|
||||
@dataclass(frozen=True, kw_only=True)
|
||||
class SensiboMotionBinarySensorEntityDescription(BinarySensorEntityDescription):
|
||||
"""Describes Sensibo Motion sensor entity."""
|
||||
|
||||
value_fn: Callable[[MotionSensor], bool | None]
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class DeviceBaseEntityDescriptionMixin:
|
||||
"""Mixin for required Sensibo base description keys."""
|
||||
@dataclass(frozen=True, kw_only=True)
|
||||
class SensiboDeviceBinarySensorEntityDescription(BinarySensorEntityDescription):
|
||||
"""Describes Sensibo Motion sensor entity."""
|
||||
|
||||
value_fn: Callable[[SensiboDevice], bool | None]
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class SensiboMotionBinarySensorEntityDescription(
|
||||
BinarySensorEntityDescription, MotionBaseEntityDescriptionMixin
|
||||
):
|
||||
"""Describes Sensibo Motion sensor entity."""
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class SensiboDeviceBinarySensorEntityDescription(
|
||||
BinarySensorEntityDescription, DeviceBaseEntityDescriptionMixin
|
||||
):
|
||||
"""Describes Sensibo Motion sensor entity."""
|
||||
|
||||
|
||||
FILTER_CLEAN_REQUIRED_DESCRIPTION = SensiboDeviceBinarySensorEntityDescription(
|
||||
key="filter_clean",
|
||||
translation_key="filter_clean",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue