Smoothing and scaling a sensor

I have built an anemometer to measure the windspeed so that, if the windspeed gets too high, I can have my electric awning retract.

I’ve used a D1 Mini flashed with Tasmota using the rule below to publish the Analogue In level.

Rule1":"ON","Once":"OFF","StopOnError":"OFF","Free":448,"Rules":"on analog#a0div10 do publish cmnd/windspeed/speed %value% endon"

My sensor is configured thus:

- platform: mqtt
  name: "Windspeed"
  state_topic: "cmnd/windspeed/speed"
  # value_template: "{{ value_json['ANALOG'].A0 }}"
  qos: 1
  unit_of_measurement: "mph"
  icon: mdi:gauge

It works fine but the reading is pretty meaningless as it isn’t calibrated and it also needs some smoothing so that I can set high and low limits.

I don’t yet have the skills to do this so I’d appreciate some pointers as to where to start.

Hi,
Any progress with your windspeed project?
What device did you use for the anemometer?
Thanks!

Does anybody have ideas by now? I want to integrate an anemometer and would appreciate any ideas on calibration…

Thanks!