From f443edfef4808cf1df26d8ffde586e1d92592f7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Mon, 15 Aug 2022 11:49:22 +0200 Subject: [PATCH] Enable statistics for WLED WiFi RSSI/Signal sensors (#76789) --- homeassistant/components/wled/sensor.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/homeassistant/components/wled/sensor.py b/homeassistant/components/wled/sensor.py index 4a677910273..1b5e81ec469 100644 --- a/homeassistant/components/wled/sensor.py +++ b/homeassistant/components/wled/sensor.py @@ -96,6 +96,7 @@ SENSORS: tuple[WLEDSensorEntityDescription, ...] = ( name="Wi-Fi signal", icon="mdi:wifi", native_unit_of_measurement=PERCENTAGE, + state_class=SensorStateClass.MEASUREMENT, entity_category=EntityCategory.DIAGNOSTIC, entity_registry_enabled_default=False, value_fn=lambda device: device.info.wifi.signal if device.info.wifi else None, @@ -105,6 +106,7 @@ SENSORS: tuple[WLEDSensorEntityDescription, ...] = ( name="Wi-Fi RSSI", native_unit_of_measurement=SIGNAL_STRENGTH_DECIBELS_MILLIWATT, device_class=SensorDeviceClass.SIGNAL_STRENGTH, + state_class=SensorStateClass.MEASUREMENT, entity_category=EntityCategory.DIAGNOSTIC, entity_registry_enabled_default=False, value_fn=lambda device: device.info.wifi.rssi if device.info.wifi else None,