Aggregating a sensor down to one value per day

Hi all,

My kids and I have been working on a hamster tracker (more info here!) which collects various statistics for use in HassIO.

This sends back data every 30s via MQTT to allow us to graph speed and distance over a night. One thing we’d now like to do is keep a single “distance” value from each day, recorded at a certain time (e.g. 9am when he’s asleep) so we can keep a separate graph of “distance run per day” for a longer period. Is this possible directly in Home Assistant, or would I need to do this directly on the NodeMCU - i.e. have it send an explicit once-per-day ping to a different MQTT endpoint?

Many thanks!

Might this help?

I’d noticed that, but it doesn’t really do exactly what I need here - not an average value, but a specific single value per day.

the state is an average but one of the attributes is total