mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Remove entity description mixin in Melcloud (#112905)
This commit is contained in:
parent
69a322a6f2
commit
f37bb6b1bf
@ -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…
x
Reference in New Issue
Block a user