What's wrong with this automation using statistics sensor?

This condition in my automation doesn’t seem to do what I’m hoping it does.

- condition: numeric_state
  entity_id: statistics.wind_kph_avg
  below: 7

Right now, wind_kph_avg is showing as 0.87. So well below 7. Nevertheless this condition seems to block the execution of my automation (I’ve narrowed it down by disabling all conditions for this automation 1 by 1 and this one seems to be the culprit).

This is the statistics sensor from configuration.yaml:

  - platform: statistics
    name: wind_kph_avg
    entity_id: sensor.pws_wind_kph
    sampling_size: 3 #Komt elke 15 minuten
    max_age:
      minutes: 65

How do I troubleshoot this?

Found it :slight_smile:

sensor.wind_kph_avg_mean

instead of

statistics.wind_kph_avg