High-frequency updating sensor filter

I have a high-frequency updating sensor (Shelly power measurement) and I’d like to throttle it to something more reasonable like reading every minute or more.
Filter sensor type isn’t working because it stores the first value of the filtering window. This is problematic because it won’t store the last 0W measurement which I need to detect idle appliance.
Any suggestions?

If you create a template helper, it will just create an additional sensor. So you will have the high-frequency updating sensor and then a new lower-frequency updating sensor. If your goal is to reduce storage, you would need to additionally exclude the original sensor from the recorder (see these docs).

A better solution might be to flash ESPHome firmware on the Shelly so that you can have granular control over when the device reports. ESPHome supports a ton of different sensor filters that will allow you to do nearly anything you can dream of. And then you don’t need to filter after the data has arrived in Home Assistant, instead you’re preventing the data from being communicated from the device in the first place.

If you explain why you want to filter the data, you might get more specific suggestions.