Corrects wind direction sensor state class

Updates the wind direction sensor to use `MEASUREMENT_ANGLE` state class for proper representation in Home Assistant.

This ensures correct interpretation of wind direction as an angle.
fix/wind_dir
schizza 2025-10-27 08:12:26 +01:00
parent 4ccc37951d
commit a43d8202dd
No known key found for this signature in database
2 changed files with 3 additions and 2 deletions

View File

@ -122,7 +122,8 @@ SENSOR_TYPES_WEATHER_API: tuple[WeatherSensorEntityDescription, ...] = (
WeatherSensorEntityDescription(
key=WIND_DIR,
native_unit_of_measurement=DEGREE,
state_class=SensorStateClass.MEASUREMENT,
state_class=SensorStateClass.MEASUREMENT_ANGLE,
device_class=SensorDeviceClass.WIND_DIRECTION,
suggested_display_precision=None,
icon="mdi:sign-direction",
translation_key=WIND_DIR,

View File

@ -132,7 +132,7 @@ SENSOR_TYPES_WSLINK: tuple[WeatherSensorEntityDescription, ...] = (
WeatherSensorEntityDescription(
key=WIND_DIR,
native_unit_of_measurement=DEGREE,
state_class=None,
state_class=SensorStateClass.MEASUREMENT_ANGLE,
device_class=SensorDeviceClass.WIND_DIRECTION,
suggested_display_precision=None,
icon="mdi:sign-direction",