Trying to smooth out cloud coverage with filter sensor

I’m trying to switch from Dark Sky to OpenWeatherMap and the only area that I find troublesome is the cloud forecast. It’s not as stable as that of Dark Sky, with lot’s of peaks and valleys. So it resembles more the actual cloud percentage than a forecast:

image

Now I thought about using a filter sensor to try and smooth things out, but I am no mathematician and tweaking the sensor would take a long time to see it’s affects.

If someone could point me in the right direction that would be great.

What I would ideally like have is the red line:

image

My current sensor has been tweaked to much today to show it’s settings nicely. But the yaml looks as follows:

- platform: filter
  name: OpenWeatherMap Forecast Cloud coverage filter
  entity_id: sensor.openweathermap_forecast_cloud_coverage
  filters:
    - filter: outlier
      window_size: 60
      radius: 15.0
    - filter: lowpass
      time_constant: 10
      precision: 0

You drawing looks more like a smooth moving average.

Give the TIME SIMPLE MOVING AVERAGE a try.

Thanks! I will try that, I have added a seperate sensor with only the time_simple_moving_average. Also added a new filter combining with what I had before together with time_simple_moving_average.

Yesterday the data did not change much since it showed for a long time 100% clouds :upside_down_face:

I will report back once I have some more data.

After some analysis the time_simple_moving_average worked best.

But after giving it some thought I decided not to use it since I am in general not happy with the cloud forecast of OpenWeatherMap. Instead of trying to ‘fix’ it, I am looking at other weather sources to see which has better data.

And did you find any?

No unfortunately not, all other source I tried have similar problems. So I decided to move a way from this data entirely and use a light sensor instead. Admitted it’s not the same, but I saw no better alternative.

1 Like