Text Input to update setpoints

I'm using a Switch node and Change node with two setpoints to do a simple temperature control via a raspberry pi. I'm wondering if it's possible to update the values within the Switch node with Dashboard's Text input node.
A bonus for me (I have no programming ability): what would a function look like to take the payload output from the text input node and produce, maybe, two messages or two topics that do a +/- of some set value? For example, you enter a 20, does a +/- of 3, and it spits out two messages, or one message, two topics, of 17 and 23. I figure that would be useful to set the range automatically. Otherwise I can just have two Text input nodes and manually set them.
Thank you so much for the help. Love you guys.

there is a node node-red-contrib-hysteresis which will do what you want to do, that is create a band within which your ouput will operate. There is also a node node-red-contrib-ramp-thermostat which will control the temperature and also has a hysteresis function built in. I haven't used the hysteresis node but I do use the ramp thermostat node and it does it's job well. One of the frustrating things I've encountered is not knowing about all the different nodes out there and what they do. Luckily if you ask in here someone usually has a suggestion that will work for you, that's how I found out about those two nodes.

That node seems to do the trick. Accepts the output of the text node, adjusts the set range, and sends a Boolean value out. Thanks for the recommendation. It always feels a little like cheating when I use a node like this where I feel like it could be done with the default nodes. But that's like feeling bad about taking vitamin supplements during a marathon while comfortably adjusting the straps to your jetpack. So I'll get over it. Thanks again.

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