Noise
I assume you are using an ADS1115 to read the wind speed and that is a good decision because the ESP32's ADC is very dirty and noisy. It will still have some noise, especially when sending data over wifi, so you'll need to take 10 or so readings and calculate the average.
Dead band
The davis anemometer uses a 20KΩ potentiometer for wind direction, when you enter the "dead zone" the potentiometer does not makes any contact and you get that random readings. To minimize this you have to add a 20KΩ resistor between pin "power" (yellow) and pin "wind direction" (green) in the picture below:
Doing this you will almost kill that effect. You can still have some "jump" that you can remove by software. What I do is comparing the last reading to the new one and if it is more than 10º I ignore it.
I assume you are using an ADS1115 to read the wind speed and that is a good decision because the ESP32's ADC is very dirty and noisy. It will still have some noise, especially when sending data over wifi, so you'll need to take 10 or so readings and calculate the average.
Dead band
The davis anemometer uses a 20KΩ potentiometer for wind direction, when you enter the "dead zone" the potentiometer does not makes any contact and you get that random readings. To minimize this you have to add a 20KΩ resistor between pin "power" (yellow) and pin "wind direction" (green) in the picture below:
Doing this you will almost kill that effect. You can still have some "jump" that you can remove by software. What I do is comparing the last reading to the new one and if it is more than 10º I ignore it.