Throttle_average results in 'nan' used in platform: pulse_meter

Hello,
I’m using the platform: pulse_meter to calculate the speed as well as the distance of my treadmill.
After booting the node the speed is ‘nan’

If my dog is running on the treadmill it show the correct speed/distance!

But if the treadmill stops it takes ‘timeout’-time (see yaml) to set the speed to 0!
That is like expected
But after another ‘timeout’-time the speed is set to ‘nan’.
Is there a way to avoid this?
Thanks

sensor:
  - platform: pulse_meter
    id:  mill_speed 
    pin:  $PIN_COUNT
    internal_filter: 150us  
    name: 'Geschwindigkeit'
    unit_of_measurement: 'km/h'
    state_class: measurement
    accuracy_decimals: 1
    internal: false
    internal_filter_mode: PULSE
    timeout: 3s
    filters:
      - multiply: $g_r_multiply                   
      - debounce: 5ms
      - throttle_average: 5s
    total:
      unit_of_measurement: 'km'
      state_class: measurement
      internal: false
      id:       s_today_km
      name:     'Strecke heute'
      filters:
        - filter_out: nan
        - multiply: $g_r_KM_PER_PULSE
      accuracy_decimals: 4                    #  All other options from Sensor.
      on_value:
        - lambda: |-
            // calculate max speed
            if((double)id(mill_speed).state > id(g_dbl_max_speed)){
              id(g_dbl_max_speed) = id(mill_speed).state;
              id(s_max_speed).publish_state(id(g_dbl_max_speed));
            }

I’ve tried this w/o effects:

filters:
      - filter_out: nan 
      - multiply: $g_r_multiply                   
      - debounce: 5ms
      - throttle_average: 5s

I think so…
Printscreen of website/debug
nan
Btw.
Same happens if using filter:

  • sliding_window_moving_average
  • throttle_average
  • median

The NaN comes from the thottle_average when no measurement, see Sensor Component — ESPHome
You should likely apply the - filter_out: nan last in filters