Easy way to calculate W out of a kWh sensor

Hi!
I have this Frient electricity meter that only reports energy usage in kWh. That is all nice but I was thinking about creating a template sensor for Watts.
Would that be possible? The calculation is straight forward but you, of course, need to get the time stamp of the previously stored data. Can this be done in a template sensor?

Thanks!

Yes you can do that with the derivative helper:

1 Like

Of course! Thank you!