From 077bded6dd46cda5f63a21e6cf1dd543c9ceb05d Mon Sep 17 00:00:00 2001 From: Andre Basche Date: Wed, 22 Mar 2023 22:57:14 +0100 Subject: [PATCH] Improve washing machine sensors --- custom_components/hon/binary_sensor.py | 11 +++++++++-- custom_components/hon/sensor.py | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/custom_components/hon/binary_sensor.py b/custom_components/hon/binary_sensor.py index dcbf52d..5efd147 100644 --- a/custom_components/hon/binary_sensor.py +++ b/custom_components/hon/binary_sensor.py @@ -27,15 +27,22 @@ BINARY_SENSORS: dict[str, tuple[HonBinarySensorEntityDescription, ...]] = { "WM": ( HonBinarySensorEntityDescription( key="attributes.lastConnEvent.category", - name="Connection", + name="Remote Control", device_class=BinarySensorDeviceClass.CONNECTIVITY, on_value="CONNECTED", + icon="mdi:remote" ), HonBinarySensorEntityDescription( key="doorLockStatus", + name="Door Lock", + device_class=BinarySensorDeviceClass.LOCK, + on_value="0", + ), + HonBinarySensorEntityDescription( + key="doorStatus", name="Door", device_class=BinarySensorDeviceClass.DOOR, - on_value="0", + on_value="1", ), ), "TD": ( diff --git a/custom_components/hon/sensor.py b/custom_components/hon/sensor.py index fed894b..f948d09 100644 --- a/custom_components/hon/sensor.py +++ b/custom_components/hon/sensor.py @@ -85,7 +85,7 @@ SENSORS: dict[str, tuple[SensorEntityDescription, ...]] = { SensorEntityDescription( key="spinSpeed", name="Spin Speed", - icon="mdi:timer", + icon="mdi:speedometer", state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfTime.MINUTES, ),