ESPHome rolling average using template sensors and filters

What was your final config for this ultrasonic sensor?