Switch node help

Node-red messages arrive at a node at different times so if you want to check the values of two different inputs (messages) then you need to 'join' them before comparing them.

You could use a join node

Or, if the slide is setting the temperature you wanted to get to, you could have three different flows.
FLOW 1: an inject connected to a change node. The inject is set to run when ever you deploy. the change node sets a flow variable (lets call it flow.setting) to an initial value.
FLOW 2: the slider sends a value to a change node which put it in flow variable (flow.setting).
FLOW 3: The sensor gets a reading and ends it to a switch node that checks the value against the flow variable (flow.setting). You could have three test 'greater than', 'equal' or 'less than'. You then send each output to more nodes that do what you want for that condition