Template solution help diff between yesterday and today

It’s not generally possible to access the value of a sensor a given time ago, unless you use an SQL sensor:

An alternative would be to build up your own record using something like this, but with bigger steps: