Template sensor for History last 24 h

Hi All,

I would like to read the value of a sensor exactly 24 hours ago. Not the total value of the last 24 hours but the exact current time -24 hours and then this value. I’m already trying to figure out how to do that. Does one of you have an idea? Many thanks for your help.

Here’s an example for MariaDB: 2023.2: How can I Assist? - #278 by tom_l

There are SQLile versions further back in the topic.

Thank you @tom_l. It works, but how can I get the value into a sensor?

Thank you. perfect

Post the configuration of the SQL Sensor you have created so that others can benefit from it.

2 Likes