your functions are referencing msg.temp1 etc, they needed to reference the incoming payload from the openhab2 in nodes.
But why not just join the messages as below, replace injects with openhub2 nodes
[{"id":"f62322f0.ae0c38","type":"inject","z":"b2964c3aa7426115","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"23 °C","payloadType":"str","x":240,"y":160,"wires":[["742592b4.5eed0c"]]},{"id":"742592b4.5eed0c","type":"change","z":"b2964c3aa7426115","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"temp1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":420,"y":220,"wires":[["fa678a58.c21848"]]},{"id":"fa678a58.c21848","type":"join","z":"b2964c3aa7426115","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":true,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":590,"y":280,"wires":[["ff4f2b84c8d03171"]]},{"id":"ff4f2b84c8d03171","type":"change","z":"b2964c3aa7426115","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"$number($trim($split(payload.temp1,\"°C\")[0])) - $number($trim($split(payload.temp2, \"°C\")[0])) > 0","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":760,"y":280,"wires":[["40d8a5b513354c8d"]]},{"id":"34d9f5fe.34070a","type":"change","z":"b2964c3aa7426115","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"temp2","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":420,"y":280,"wires":[["fa678a58.c21848"]]},{"id":"40d8a5b513354c8d","type":"debug","z":"b2964c3aa7426115","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":970,"y":280,"wires":[]},{"id":"1564eaff.715645","type":"inject","z":"b2964c3aa7426115","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"20 °C","payloadType":"str","x":240,"y":240,"wires":[["34d9f5fe.34070a"]]}]