Set device class for wind direction weatherflow entities (#139397)

* Set wind_direction device class in weatherflow

* Remove measurement state_class from wind direction entities
pull/139538/head
Nathan Spencer 2025-02-28 10:33:58 -07:00 committed by GitHub
parent 2e077cbf12
commit e9bb4625d8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -267,16 +267,16 @@ SENSORS: tuple[WeatherFlowSensorEntityDescription, ...] = (
WeatherFlowSensorEntityDescription(
key="wind_direction",
translation_key="wind_direction",
device_class=SensorDeviceClass.WIND_DIRECTION,
native_unit_of_measurement=DEGREE,
state_class=SensorStateClass.MEASUREMENT,
event_subscriptions=[EVENT_RAPID_WIND, EVENT_OBSERVATION],
raw_data_conv_fn=lambda raw_data: raw_data.magnitude,
),
WeatherFlowSensorEntityDescription(
key="wind_direction_average",
translation_key="wind_direction_average",
device_class=SensorDeviceClass.WIND_DIRECTION,
native_unit_of_measurement=DEGREE,
state_class=SensorStateClass.MEASUREMENT,
raw_data_conv_fn=lambda raw_data: raw_data.magnitude,
),
)