Google Sheets integration: delete formulas

Good morning,

Every night, I save data in Google Sheets. It works very well.

I added columns with calculations (sum, condition, percentage …). Each time a line is added by Home Assistant, the data is copied without problem, but the formulas are deleted …

I am obliged to regularly copy the formulas at the level of the new lines inserted.

How to keep the formulas ?

Thanks in advance.

If it’s feasible with what you are doing you can use the MAP function in the first value cell instead of manual copying/dragging down the formula for every new cell.

You could have two tabs in the spreadsheet – one that HA writes to and has nothing else and one where the first 5 columns (or however many) have a formula to copy from the first tab and the remaining columns are your formulas.

Very good idea ! It works.

Here is an example of a formula :

= MAP (G2:G370; H2:H370; Lambda (HP; HC; if(HP=“”;“”;Sum (HP+HC))))

Thanks !