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