mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 05:37:44 +00:00
Remove entity description mixin in Z-Wave.js (#112979)
This commit is contained in:
parent
0d68c27985
commit
a8bde2df3c
@ -59,20 +59,13 @@ class NotificationZWaveJSEntityDescription(BinarySensorEntityDescription):
|
||||
states: tuple[str, ...] | None = None
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class PropertyZWaveJSMixin:
|
||||
"""Represent the mixin for property sensor descriptions."""
|
||||
@dataclass(frozen=True, kw_only=True)
|
||||
class PropertyZWaveJSEntityDescription(BinarySensorEntityDescription):
|
||||
"""Represent the entity description for property name sensors."""
|
||||
|
||||
on_states: tuple[str, ...]
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class PropertyZWaveJSEntityDescription(
|
||||
BinarySensorEntityDescription, PropertyZWaveJSMixin
|
||||
):
|
||||
"""Represent the entity description for property name sensors."""
|
||||
|
||||
|
||||
# Mappings for Notification sensors
|
||||
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json
|
||||
NOTIFICATION_SENSOR_MAPPINGS: tuple[NotificationZWaveJSEntityDescription, ...] = (
|
||||
|
@ -35,9 +35,9 @@ from .entity import ZWaveBaseEntity
|
||||
PARALLEL_UPDATES = 0
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class ZwaveHumidifierEntityDescriptionRequiredKeys:
|
||||
"""A class for humidifier entity description required keys."""
|
||||
@dataclass(frozen=True, kw_only=True)
|
||||
class ZwaveHumidifierEntityDescription(HumidifierEntityDescription):
|
||||
"""A class that describes the humidifier or dehumidifier entity."""
|
||||
|
||||
# The "on" control mode for this entity, e.g. HUMIDIFY for humidifier
|
||||
on_mode: HumidityControlMode
|
||||
@ -49,13 +49,6 @@ class ZwaveHumidifierEntityDescriptionRequiredKeys:
|
||||
setpoint_type: HumidityControlSetpointType
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class ZwaveHumidifierEntityDescription(
|
||||
HumidifierEntityDescription, ZwaveHumidifierEntityDescriptionRequiredKeys
|
||||
):
|
||||
"""A class that describes the humidifier or dehumidifier entity."""
|
||||
|
||||
|
||||
HUMIDIFIER_ENTITY_DESCRIPTION = ZwaveHumidifierEntityDescription(
|
||||
key="humidifier",
|
||||
device_class=HumidifierDeviceClass.HUMIDIFIER,
|
||||
|
Loading…
x
Reference in New Issue
Block a user