the layout is:
inject -> http request -> funktion -> template
I want the color to change based on whether it is connected or not. But no matter what I try, I am not able to "inject" a color into the template. Please help me figure out a way to do this. I am not proficient in coding and have mostly been using AI to write my code. Thank you in advance.
funktion:
const html = msg.payload || "";
const normalizedHtml = html.toUpperCase();
if (normalizedHtml.includes("RUN")) {
msg.color = "#3FADB5";
msg.text = "Connected";
} else {
msg.color = "yellow";
msg.text = "No connection";
}
return msg;
template:
the rest (injector and http request) are working as intended

