Writing data to new variable - no calculation

So I have an issue where a device I have has a slightly different variable for it’s temp… I’m trying to just take the variable it’s sending, and in a payload parser just send the data to a new variable.

Variable device is sending: tempc_sht
Variable my dashboard needs it to be: temp_sht

I just need to take the data from tempc_sht and put in to temp_sht.

Thinking payload parser is the best way to do this, unless it’s recommended in Analysis instead?

Yes, Payload Parser would be the best place to do this change.

Just add a code like that:

const tmpc_sht = payload.find((data) => data.variable === "tempc_sht");
if (tmpc_sht) {
 tmpc_sht.variable = "temp_sht";
1 Like