Last active
December 11, 2022 10:25
-
-
Save MinaMal/b8b032f2a1b773ec6e4df1fb8c0516e7 to your computer and use it in GitHub Desktop.
Node-RED JavaScript - Function node
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a = msg.payload.value/10 | |
if (a > 31.0) | |
{ | |
msg.payload.alarm = 1; | |
} | |
else | |
{ | |
msg.payload.alarm = 0; | |
} | |
return msg; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment