From 9d25be8116f22fea8345f8a6ea105377eddbdbca Mon Sep 17 00:00:00 2001 From: Pieter-HA <122535893+Pieter-HA@users.noreply.github.com> Date: Thu, 4 Jan 2024 10:29:42 +0100 Subject: [PATCH] Add correct state class, device class and unit for sensor.smartevse. Added correct state class, device class and unit for sensor.smartevse_wifi_rssi. --- custom_components/smartevse/const.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/custom_components/smartevse/const.py b/custom_components/smartevse/const.py index 0fc19ed..30e20f6 100644 --- a/custom_components/smartevse/const.py +++ b/custom_components/smartevse/const.py @@ -6,13 +6,12 @@ UnitOfPower, UnitOfTemperature, UnitOfTime, + SIGNAL_STRENGTH_DECIBELS_MILLIWATT ) - from homeassistant.components.sensor import ( SensorDeviceClass, SensorStateClass, ) - from .models import ( SmartEVSENumberEntityDescription, SmartEVSESelectEntityDescription, @@ -94,6 +93,9 @@ SmartEVSESensorEntityDescription( key="smartevse_wifi_rssi", name="SmartEVSE Wifi RSSI", + state_class=SensorStateClass.MEASUREMENT, + unit=SIGNAL_STRENGTH_DECIBELS_MILLIWATT, + device_class=SensorDeviceClass.SIGNAL_STRENGTH, ), SmartEVSESensorEntityDescription( key="smartevse_wifi_bssid",