So, a friend of mine realized they did need to use a template sensor to properly compute their PV production and use. They created the following template sensor:
{{ float(states('sensor.xyz_dc_current_2')) * float(states('sensor.zyz_dc_voltage_2')) }}
Data for those sensors goes back for the past year or so.
Is there a safe way to backfill the history of the template sensor, other than directly writing to the sqlite database?