Add history feature to automations or templates (not as a helper)

It would be very handy if we can use history stats also in templates or directly in automations. I do not need every query as a helper so I could query the history of an entity only if needed.
F.e.: if I only want to switch on a relay once a day and have to check it on every automation trigger, i could do that query directly in the automation via template or building block.

I did one have no idea what you are talking about.

They are essentially asking for a function in templates that gets an entities history.

I’ve been toying with the idea of adding this, however it would be a service call like the weather.get_forecasts service.

4 Likes

that would rock

1 Like

that would be awesome! exactly what I need!
Would it be complex to add this feature?

1 Like

I’m going to remove the solution check for the time being.

@petro Do you have any plan or example how to implement such a ‘weather.get_history’ service?
i would like to push that topic to get a basic implementation.