OUTLIER filter does not filter

I have not got the outlier filter to work correctly yet either.

This is my filtered sensor:

- platform: filter
  name: "All appliances energy"
  entity_id: sensor.appliances_plus_computer_energy
  unique_id: sensor.filtered_appliances_plus_computer_energy
  filters:
    - filter: outlier
      window_size: 20
      radius: 1.0

The source sensor is a whole load of energy sensors (Shelly devices and Aqara outlets):

- sensor:
  - name: "All appliances energy"
    unique_id: sensor.appliances_plus_computer_energy
    state: >
      {% set energy = states('sensor.shelly_2pm_plus_kitchen_switch_1_energy') | float(0)
      + states('sensor.shelly_2pm_plus_kitchen_switch_0_energy') | float(0)
      + states('sensor.shelly_1pm_plus_dishwasher_switch_0_energy') | float(0)
      + states('sensor.shelly_1pm_plus_fridges_switch_0_energy') | float(0)
      + states('sensor.shelly_2pm_plus_laundry_switch_0_energy') | float(0)
      + states('sensor.shelly_2pm_plus_laundry_switch_1_energy') | float(0)
      + states('sensor.freezer_outlet_energy') | float(0)
      + states('sensor.electrical_cabinet_outlet_energy') | float(0)
      + states('sensor.internet_outlet_energy') | float(0)
      + states('sensor.tv_outlet_energy') | float(0)
      + states('sensor.office_outlet_energy') | float(0) %}
      {{ energy }}
    unit_of_measurement: kWh
    state_class: total_increasing
    device_class: energy

But I still occasionally get sensor total values creeping into the statistics which seem to be from restarts of HA. I’ve had multiple erroneous values today from morning and evening restarts.

Normal values are expected in the range of 0.01 - 0.1 kWh:

However, the abnormal values are in the 100 - 1000 kWh range. From the explanation that @tom_l gave, I would expect this outlier filter to eliminate those values…