How to do time triggered copy of values from one attributes to another of template sensor

If you are interested, it’s possible to use the Utility Meter integration to monitor a sensor’s value and maintain a long-term record of daily/weekly/monthly/yearly data. I just gave someone else an example of how to use it to record heating hours.