From fb8306a4d9d57ea6f0da234f1f9ed244fda8160d Mon Sep 17 00:00:00 2001 From: drudgebg Date: Tue, 21 Mar 2023 13:59:39 +0200 Subject: [PATCH] Update sensor.py Add Tumble Dryer --- custom_components/hon/sensor.py | 52 +++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/custom_components/hon/sensor.py b/custom_components/hon/sensor.py index a605c9a..fed894b 100644 --- a/custom_components/hon/sensor.py +++ b/custom_components/hon/sensor.py @@ -89,6 +89,58 @@ SENSORS: dict[str, tuple[SensorEntityDescription, ...]] = { state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfTime.MINUTES, ), + ), + "TD": ( + SensorEntityDescription( + key="machMode", + name="Machine Status", + icon="mdi:information", + translation_key="mode" + ), + SensorEntityDescription( + key="errors", + name="Error", + icon="mdi:math-log", + translation_key="errors" + ), + SensorEntityDescription( + key="remainingTimeMM", + name="Remaining Time", + icon="mdi:timer", + state_class=SensorStateClass.MEASUREMENT, + native_unit_of_measurement=UnitOfTime.MINUTES, + ), + SensorEntityDescription( + key="delayTime", + name="Start Time", + icon="mdi:clock-start", + state_class=SensorStateClass.MEASUREMENT, + native_unit_of_measurement=UnitOfTime.MINUTES, + ), + SensorEntityDescription( + key="prCode", + name="Program", + icon="mdi:tumble-dryer", + translation_key="tumbledryerprogram" + ), + SensorEntityDescription( + key="prPhase", + name="Program Phase", + icon="mdi:tumble-dryer", + translation_key="tumbledryerprogramphase" + ), + SensorEntityDescription( + key="dryLevel", + name="Dry level", + icon="mdi:hair-dryer", + translation_key="tumbledryerdrylevel" + ), + SensorEntityDescription( + key="tempLevel", + name="Temperature level", + icon="mdi:thermometer", + translation_key="tumbledryertemplevel" + ), ) }