ESPHome adds a sensor that preserves a running average across device restarts. Makers smoothing a reading over hours, such as outdoor temperature, can keep that accumulated picture instead of rebuilding it from the first measurement after a reboot.
Clyde Stubbs supplies a choice between a fixed weight for each reading and an average that accounts for the time between readings. A further option suits sensors that publish only when their value changes. Saving and restoring the average is enabled by default, with an action to reset it. J. Nick Koston reviewed the component and its guide.