From 6eceee1f4e3e4a18561ae282f88d7ad0b82bc4c2 Mon Sep 17 00:00:00 2001 From: convicte <78666770+convicte@users.noreply.github.com> Date: Sat, 15 Mar 2025 23:13:21 +0100 Subject: [PATCH] Implement SensorDeviceClass.WIND_DIRECTION This commit adds the latest SensorDeviceClass.WIND_DIRECTION to facilitate correct long term statistics collection for the wind direction sensor. --- custom_components/sws12500/sensors_wslink.py | 1 + 1 file changed, 1 insertion(+) diff --git a/custom_components/sws12500/sensors_wslink.py b/custom_components/sws12500/sensors_wslink.py index 92cfe03..a3a7e97 100644 --- a/custom_components/sws12500/sensors_wslink.py +++ b/custom_components/sws12500/sensors_wslink.py @@ -123,6 +123,7 @@ SENSOR_TYPES_WSLINK: tuple[WeatherSensorEntityDescription, ...] = ( key=WIND_DIR, native_unit_of_measurement=DEGREE, state_class=SensorStateClass.MEASUREMENT, + device_class=SensorDeviceClass.WIND_DIRECTION, suggested_display_precision=None, icon="mdi:sign-direction", translation_key=WIND_DIR,