Percentage Sensor?

Hey guys

I don’t know if that exists already but I’m wondering is a sensor type that can tell me the percentage of a binary sensor state or a presence sensor state over the last X seconds.

For example
The state “home” is detected 1 time during last 10 minutes
The state “not_home” is detected 9 times during last 10 minutes
This should tell me I was “home” by 10%

Have a look at the history statistics sensor

Wonderful, thanks a lot Tom, you are a star :star_struck:

Perfet for me, too.