I am sure it is very easy but I am struggling.
I am trying to use a button as an indicator on the Node-Red Dashboard from a Modbus TCP connection as the picture shows:
The formula in the function is as follows:
if (msg.payload === 28){
msg.colour = "green";
msg.background ="red";
return msg;}
else{msg.colour ="white";
return msg;}
However the button on my dashboard does not change colour.
Can anyone here help please?
I am open to other suggestions to make an indicator in Node-Red's dashboard.
EDIT I have edited the typo.