Create new helpers to count time to showing lapsed time

Why wasn’t a helper created to count the state time of an entity?
It would make some automations and reports much easier. Because creating scripts and templates can sometimes get very complicated.

History Stats

Sorry the image is in Portuguese. But I’m talking about creating a helper here, easy and quick to add for this function.