Thank you for your reply,
Using the text node on number mode and having two inputs would work fine with me. The values for the hysteresis can be set using the inject node, but I generally read the raw temperature data from the sensor. I shall include both in the code below.
So in this example, how could I set the upper and lower threshold using the inject node?
[
{
"id": "a0a5fb88.c4d95",
"type": "tab",
"label": "Flow 1",
"disabled": false,
"info": ""
},
{
"id": "eb852bf.e0770d8",
"type": "hysteresis",
"z": "a0a5fb88.c4d95",
"name": "",
"ThresholdType": "fixed",
"ThresholdRising": "36",
"ThresholdFalling": "38",
"TopicThreshold": "",
"TopicCurrent": "",
"ThresholdDeltaRising": "",
"ThresholdDeltaFalling": "",
"InitialMessage": false,
"OutRisingType": "pay",
"OutRisingValue": "",
"OutFallingType": "pay",
"OutFallingValue": "",
"OutTopicType": "top",
"OutTopicValue": "",
"x": 220,
"y": 240,
"wires": [
[
"1d74aee2.332291",
"96c8167f.c81aa"
]
]
},
{
"id": "1d74aee2.332291",
"type": "function",
"z": "a0a5fb88.c4d95",
"name": "",
"func": "msg.payload = msg.hystdirection\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 370,
"y": 240,
"wires": [
[
"efdea502.5d96f8"
]
]
},
{
"id": "efdea502.5d96f8",
"type": "switch",
"z": "a0a5fb88.c4d95",
"name": "",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "high",
"vt": "str"
},
{
"t": "eq",
"v": "low",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 490,
"y": 240,
"wires": [
[
"419e940c.b457a4"
],
[
"d04e5270.f5fce"
]
]
},
{
"id": "419e940c.b457a4",
"type": "change",
"z": "a0a5fb88.c4d95",
"name": "Off",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "0",
"tot": "num"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 650,
"y": 180,
"wires": [
[
"8ac765e8.628cb8"
]
]
},
{
"id": "d04e5270.f5fce",
"type": "change",
"z": "a0a5fb88.c4d95",
"name": "On",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "100",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 650,
"y": 300,
"wires": [
[
"8ac765e8.628cb8"
]
]
},
{
"id": "8ac765e8.628cb8",
"type": "rpi-gpio out",
"z": "a0a5fb88.c4d95",
"name": "Red (Heater)",
"pin": "32",
"set": false,
"level": "0",
"freq": "",
"out": "pwm",
"x": 830,
"y": 240,
"wires": []
},
{
"id": "a3ea80cb.df824",
"type": "rpi-ds18b20",
"z": "a0a5fb88.c4d95",
"topic": "",
"array": false,
"name": "",
"x": 90,
"y": 320,
"wires": [
[
"eb852bf.e0770d8"
]
]
},
{
"id": "10b4d234.d3189e",
"type": "inject",
"z": "a0a5fb88.c4d95",
"name": "",
"topic": "",
"payload": "33",
"payloadType": "num",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"x": 90,
"y": 60,
"wires": [
[
"eb852bf.e0770d8"
]
]
},
{
"id": "2a564c02.c6290c",
"type": "inject",
"z": "a0a5fb88.c4d95",
"name": "",
"topic": "",
"payload": "50",
"payloadType": "num",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"x": 90,
"y": 120,
"wires": [
[
"eb852bf.e0770d8"
]
]
},
{
"id": "96c8167f.c81aa",
"type": "debug",
"z": "a0a5fb88.c4d95",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"x": 360,
"y": 160,
"wires": []
},
{
"id": "8712ea62.029fa",
"type": "inject",
"z": "a0a5fb88.c4d95",
"name": "",
"topic": "",
"payload": "37",
"payloadType": "num",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"x": 90,
"y": 180,
"wires": [
[
"eb852bf.e0770d8"
]
]
}
]