Recalculate template_sensor data from history / recorded data

I have a template sensor, which just reports true / false (playing piano - yes/no, derived from mobile phone app sensors (interactive mode == true + last app used == ‘piano’)) and recorded data from the last month.

Now I would like to extend my template sensor with another mobile phone with the same sensor data (i have also recordings from the last week).

I’ve extended now my template sensor and I would like to recalculate the historical data of this template sensor, to have all data combined (phone 1 + new phone 2).

Is there any way to recalculate a template sensor (i have all other data recorded as I mentioned)?

This is not possible unless you edit the database directly. Changing a template sensor does not retroactively alter historical data already recorded for that sensor.