From 4baba777801765b0ce9025c9ef170d3465d874fc Mon Sep 17 00:00:00 2001 From: Patrick ZAJDA Date: Sat, 8 Oct 2022 20:02:26 +0200 Subject: [PATCH] Add state class measurement to SwitchBot signal strength sensors (#79886) --- homeassistant/components/switchbot/sensor.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/homeassistant/components/switchbot/sensor.py b/homeassistant/components/switchbot/sensor.py index e435e71efbd..8e5d0e92d5a 100644 --- a/homeassistant/components/switchbot/sensor.py +++ b/homeassistant/components/switchbot/sensor.py @@ -28,6 +28,7 @@ SENSOR_TYPES: dict[str, SensorEntityDescription] = { key="rssi", native_unit_of_measurement=SIGNAL_STRENGTH_DECIBELS_MILLIWATT, device_class=SensorDeviceClass.SIGNAL_STRENGTH, + state_class=SensorStateClass.MEASUREMENT, entity_registry_enabled_default=False, entity_category=EntityCategory.DIAGNOSTIC, ), @@ -35,6 +36,7 @@ SENSOR_TYPES: dict[str, SensorEntityDescription] = { key="wifi_rssi", native_unit_of_measurement=SIGNAL_STRENGTH_DECIBELS_MILLIWATT, device_class=SensorDeviceClass.SIGNAL_STRENGTH, + state_class=SensorStateClass.MEASUREMENT, entity_registry_enabled_default=False, entity_category=EntityCategory.DIAGNOSTIC, ),