mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 15:47:12 +00:00
Add drying step sensor for Miele tumble dryers (#144515)
Add drying step sensor for tumple dryers
This commit is contained in:
parent
90a7ecdce3
commit
9abb4ffc97
@ -339,6 +339,20 @@ class StateProgramType(MieleEnum):
|
||||
unknown = -9999
|
||||
|
||||
|
||||
class StateDryingStep(MieleEnum):
|
||||
"""Defines drying steps."""
|
||||
|
||||
extra_dry = 0
|
||||
normal_plus = 1
|
||||
normal = 2
|
||||
slightly_dry = 3
|
||||
hand_iron_1 = 4
|
||||
hand_iron_2 = 5
|
||||
machine_iron = 6
|
||||
smoothing = 7
|
||||
unknown = -9999
|
||||
|
||||
|
||||
WASHING_MACHINE_PROGRAM_ID: dict[int, str] = {
|
||||
-1: "no_program", # Extrapolated from other device types.
|
||||
0: "no_program", # Returned by the API when no program is selected.
|
||||
|
@ -32,6 +32,9 @@
|
||||
"core_target_temperature": {
|
||||
"default": "mdi:thermometer-probe"
|
||||
},
|
||||
"drying_step": {
|
||||
"default": "mdi:water-outline"
|
||||
},
|
||||
"program_id": {
|
||||
"default": "mdi:selection-ellipse-arrow-inside"
|
||||
},
|
||||
|
@ -32,6 +32,7 @@ from .const import (
|
||||
STATE_PROGRAM_PHASE,
|
||||
STATE_STATUS_TAGS,
|
||||
MieleAppliance,
|
||||
StateDryingStep,
|
||||
StateProgramType,
|
||||
StateStatus,
|
||||
)
|
||||
@ -416,6 +417,23 @@ SENSOR_TYPES: Final[tuple[MieleSensorDefinition, ...]] = (
|
||||
),
|
||||
),
|
||||
),
|
||||
MieleSensorDefinition(
|
||||
types=(
|
||||
MieleAppliance.WASHER_DRYER,
|
||||
MieleAppliance.TUMBLE_DRYER,
|
||||
MieleAppliance.TUMBLE_DRYER_SEMI_PROFESSIONAL,
|
||||
),
|
||||
description=MieleSensorDescription(
|
||||
key="state_drying_step",
|
||||
translation_key="drying_step",
|
||||
value_fn=lambda value: StateDryingStep(
|
||||
cast(int, value.state_drying_step)
|
||||
).name,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
device_class=SensorDeviceClass.ENUM,
|
||||
options=sorted(StateDryingStep.keys()),
|
||||
),
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
|
@ -191,6 +191,19 @@
|
||||
"energy_consumption": {
|
||||
"name": "Energy consumption"
|
||||
},
|
||||
"drying_step": {
|
||||
"name": "Drying step",
|
||||
"state": {
|
||||
"extra_dry": "Extra dry",
|
||||
"hand_iron_1": "Hand iron 1",
|
||||
"hand_iron_2": "Hand iron 2",
|
||||
"machine_iron": "Machine iron",
|
||||
"normal_plus": "Normal plus",
|
||||
"normal": "Normal",
|
||||
"slightly_dry": "Slightly dry",
|
||||
"smoothing": "Smoothing"
|
||||
}
|
||||
},
|
||||
"program_phase": {
|
||||
"name": "Program phase",
|
||||
"state": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user