mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +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
|
from .const import DOMAIN
|
||||||
|
|
||||||
|
|
||||||
@dataclasses.dataclass(frozen=True)
|
@dataclasses.dataclass(frozen=True, kw_only=True)
|
||||||
class MelcloudRequiredKeysMixin:
|
class MelcloudSensorEntityDescription(SensorEntityDescription):
|
||||||
"""Mixin for required keys."""
|
"""Describes Melcloud sensor entity."""
|
||||||
|
|
||||||
value_fn: Callable[[Any], float]
|
value_fn: Callable[[Any], float]
|
||||||
enabled: Callable[[Any], bool]
|
enabled: Callable[[Any], bool]
|
||||||
|
|
||||||
|
|
||||||
@dataclasses.dataclass(frozen=True)
|
|
||||||
class MelcloudSensorEntityDescription(
|
|
||||||
SensorEntityDescription, MelcloudRequiredKeysMixin
|
|
||||||
):
|
|
||||||
"""Describes Melcloud sensor entity."""
|
|
||||||
|
|
||||||
|
|
||||||
ATA_SENSORS: tuple[MelcloudSensorEntityDescription, ...] = (
|
ATA_SENSORS: tuple[MelcloudSensorEntityDescription, ...] = (
|
||||||
MelcloudSensorEntityDescription(
|
MelcloudSensorEntityDescription(
|
||||||
key="room_temperature",
|
key="room_temperature",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user