Problem with outlier filter

Hi,
I’ve got a sensor for outdoor temperature that I am reading via the Modbus integration (its attached to my heat pump). The modbus connection is spotty, resulting in 0s being reported instead of the actual value. As you can see here:

I have set up a filtered version of this sensor using the Outlier filter, with the goal of removing these 0 outliers from the sensor. The filtered sensor is set up like this:

  - platform: filter
    name: "Filtered Elga Outside Temperature"
    entity_id: sensor.elga_outside_temperature
    filters:
      - filter: outlier
        window_size: 10
        radius: 2.0

However, it still sometimes gives me unuseful values, despite filtering for outliers.

I have tried playing with the radius and window_size parameters, but this seems to be the best I can get. Can anyone suggest how to tweak the outlier filter for better results? Or a completely different approach to filtering out the 0s?

Thanks!