Hi wehr is my error?
var gridpower=flow.get('gridpower') || 0; if (msg.payload =1 && gridpower !=0){ msg.payload=0; } I always become the yellow question mark with assignment in conditional expression in front of : if (msg.payload =1 && gridpower !=0){
Hi @edstobi
What that warning is telling you is that in your if statement, you are setting the value of msg.payload to 1, rather than testing its value.
if
msg.payload
1
In JavaScript, to compare a value you use ===:
===
if (msg.payload === 1 && gridpower != 0){
And Just for completeness: