Open linuxha opened 4 years ago
This works:
{"payload": "on", "timeout": 3, "warning": "0" }
But this does not:
{"payload": "on", "timeout": 3, "warning": 0 }
I'll fix the code to accept both integer and string forms.
Still seems to be an issue when setting from the GUI. Unless you also set the "Warning state payload" to nothing (blank). Otherwise the warning set to 0 in the GUI is ignored and the warning payload is sent at 5 seconds.
Okay, I think I see the problem:
node.warnT = parseInt(n.warning)||5;// node-input-warning - time in seconds (?)
I'll need to change the logic and probably the documentation. With what I have if it's set to 0 in the GUI, the warning gets set to 5 seconds. I'll need to figure out what the default should be and adjust accordingly.
Thanks for finding that.
A msg.warning of 0 doesn't override the GUI setting to cancel sending a warning message If I send a message like this:
{ "payload": "on", "timeout": 4, "warning": 0 }
I still get the warning message sent on first output{ "payload":"warn" }
The problem is being investigated