From 13102b8631f008cd3b3c84225227f87f2e15e90f Mon Sep 17 00:00:00 2001 From: pink88 Date: Sun, 28 Jul 2024 21:16:08 +0100 Subject: [PATCH] Updated DeviceClass for signal and battery sensor entities --- custom_components/wundasmart/sensor.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/custom_components/wundasmart/sensor.py b/custom_components/wundasmart/sensor.py index e38fd13..e6a5ead 100644 --- a/custom_components/wundasmart/sensor.py +++ b/custom_components/wundasmart/sensor.py @@ -69,7 +69,7 @@ class WundaSensorDescription(SensorEntityDescription): name="Battery Level", icon=lambda x: icon_for_battery_level(_number_or_none(x)), native_unit_of_measurement=PERCENTAGE, - device_class=SensorDeviceClass.HUMIDITY, + device_class=SensorDeviceClass.BATTERY, state_class=SensorStateClass.MEASUREMENT, ), WundaSensorDescription( @@ -77,7 +77,7 @@ class WundaSensorDescription(SensorEntityDescription): name="Signal Level", icon=lambda x: icon_for_signal_level(_number_or_none(x)), native_unit_of_measurement=PERCENTAGE, - device_class=SensorDeviceClass.HUMIDITY, + device_class=SensorDeviceClass.SIGNAL_STRENGTH, state_class=SensorStateClass.MEASUREMENT, ) ] @@ -96,7 +96,7 @@ class WundaSensorDescription(SensorEntityDescription): name="Battery Level", icon=lambda x: icon_for_battery_level(_number_or_none(x)), native_unit_of_measurement=PERCENTAGE, - device_class=SensorDeviceClass.HUMIDITY, + device_class=SensorDeviceClass.BATTERY, state_class=SensorStateClass.MEASUREMENT, ), WundaSensorDescription( @@ -104,7 +104,7 @@ class WundaSensorDescription(SensorEntityDescription): name="Signal Level", icon=lambda x: icon_for_signal_level(_number_or_none(x)), native_unit_of_measurement=PERCENTAGE, - device_class=SensorDeviceClass.HUMIDITY, + device_class=SensorDeviceClass.SIGNAL_STRENGTH, state_class=SensorStateClass.MEASUREMENT, ), WundaSensorDescription(