Average Time Sensor?

Does anyone have any ideas how to create an average time sensor? What I would like to do is have the sensor create a moving average of the time of a certain event. For example, it would be able to say that for the last 7 days, on average, I arrive home at 5:17PM. I took a look at the stats, filter, and baysian. But I don’t think that’s what I am after. Maybe history stats combined with stats? Has anyone tried anything similar?

There is an integration in Hacs.