Sleep function no related to time, related to values

Hi, guys I want to have like a sleep function so basically I'm reading values for example from 0 to 50 so when the value is close to 0 I need some msg.payload interrupt to no send any msg, and when it approximates to 50 will activate again the msg.payload. Some help?
Any examples?

Why not send the reading to a switch node and test for < 5 and > 45. If it is less than five don't do anything and if it is greater than 45 let the message continue.

like a switch case?
explait it more please

Try playing with the switch node to see how it works. For testing connect two inject nodes to it and set them to each inject a number. Connect a debug to the outputs of the change node and give it a test.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.