Remove entity description mixin in Melcloud (#112905)
This commit is contained in:
parent
69a322a6f2
commit
f37bb6b1bf
1 changed files with 3 additions and 10 deletions
|
@ -24,21 +24,14 @@ from . import MelCloudDevice
|
|||
from .const import DOMAIN
|
||||
|
||||
|
||||
@dataclasses.dataclass(frozen=True)
|
||||
class MelcloudRequiredKeysMixin:
|
||||
"""Mixin for required keys."""
|
||||
@dataclasses.dataclass(frozen=True, kw_only=True)
|
||||
class MelcloudSensorEntityDescription(SensorEntityDescription):
|
||||
"""Describes Melcloud sensor entity."""
|
||||
|
||||
value_fn: Callable[[Any], float]
|
||||
enabled: Callable[[Any], bool]
|
||||
|
||||
|
||||
@dataclasses.dataclass(frozen=True)
|
||||
class MelcloudSensorEntityDescription(
|
||||
SensorEntityDescription, MelcloudRequiredKeysMixin
|
||||
):
|
||||
"""Describes Melcloud sensor entity."""
|
||||
|
||||
|
||||
ATA_SENSORS: tuple[MelcloudSensorEntityDescription, ...] = (
|
||||
MelcloudSensorEntityDescription(
|
||||
key="room_temperature",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue