MQTT Wind direction Sensor does not work with circular average

I’m trying to dampen a LaCrosse Breeze Pro wind sensor direction by adding a circular average statistic over a 3 minute period for a new package I’m creating for an Awning Warning for my RV. Everything is working without this new sensor. I’m using Degree units DEGREE: Final = “°” the value is numeric but I’m getting this error

Logger: homeassistant.config
Source: config.py:942
First occurred: May 19, 2025 at 10:48:58 AM (1 occurrence)
Last logged: May 19, 2025 at 10:48:58 AM

Invalid config for 'sensor' from integration 'statistics' at packages/breeze_pro.yaml, line 54: The configured characteristic 'circular_mean' is not supported for the configured source sensor '', got {'platform': 'statistics', 'name': 'Wind Dir Avg', 'entity_id': 'sensor.breeze_pro_wind_dir_debounced', 'state_characteristic': 'circular_mean', 'sampling_size': 30, 'max_age': {'minutes': 3}}, please check the docs at https://www.home-assistant.io/integrations/statistics

The package file looks like this:


homeassistant:
  customize: {}

mqtt:
  sensor:
    - name: Breeze Pro Temp
      state_topic: rtl_915rv/LaCrosse-BreezePro/590470
      device_class: temperature
      unit_of_measurement: "°F"
      value_template: '{{ value_json.temperature_F | round(1) }}'
      force_update: true
      payload_available: online
      payload_not_available: offline
      unique_id: 41CA5C2ED5344676

    - name: Breeze Pro Humidity
      state_topic: rtl_915rv/LaCrosse-BreezePro/590470
      unit_of_measurement: '%'
      value_template: '{{ value_json.humidity | round(1) }}'
      force_update: true
      payload_available: online
      payload_not_available: offline
      unique_id: C871AF0D2B614F3E

    - name: Breeze Pro Wind Speed
      state_topic: rtl_915rv/LaCrosse-BreezePro/590470
      device_class: wind_speed
      unit_of_measurement: mph
      value_template: '{{ value_json.wind_avg_mi_h | round(1) }}'
      force_update: true
      payload_available: online
      payload_not_available: offline
      unique_id: 270ACE67A4E04805

    - name: Breeze Pro Wind Dir Debounced
      state_topic: rtl_915rv/LaCrosse-BreezePro/590470
      unit_of_measurement: "°"
      value_template: '{{ value_json.wind_dir_deg | round(2) }}'
      force_update: true
      payload_available: online
      payload_not_available: offline
      unique_id: 270ACE67A4E04508_DIRFIX

sensor:
  - platform: statistics
    name: Wind Speed Avg
    entity_id: sensor.breeze_pro_wind_speed
    state_characteristic: mean
    sampling_size: 30
    max_age:
      minutes: 3

  - platform: statistics
    name: Wind Dir Avg
    entity_id: sensor.breeze_pro_wind_dir_debounced
    state_characteristic: circular_mean
    sampling_size: 30
    max_age:
      minutes: 3

Am I missing something or is there a problem with Home Assistant core?

Is it by chance supposed to be mean_circular ? That’s how it’s listed in the doc, though it’s confusing that they describe it in english as circular mean :sweat_smile:

Yes, The wind direction is between 0 degrees and 360 degrees. That is why a linear average will not work especially when the wind is blowing from the north. It could bounce between 350 and 10 degrees. I will try changing to mean_circular and post back with results.