# Comparison of two temperatures

**URL:** <https://discourse.nodered.org/t/comparison-of-two-temperatures/39239>\
**Category:** General\
**Created:** [16 January 2021 19:10 UTC](https://discourse.nodered.org/t/comparison-of-two-temperatures/39239 "2021-01-16T19:10:15Z")\
**Posts on this page:** 4\
**Page:** 2

<div class="post-metadata">

**Author:** ![gerry](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gerry/32/21604_2.png) [@gerry](https://discourse.nodered.org/u/gerry)\
**Post date:** [17 January 2021 20:47 UTC](https://discourse.nodered.org/t/comparison-of-two-temperatures/39239/21 "2021-01-17T20:47:09Z")

</div>

```auto
[{"id":"2359a6f.6d6f85a","type":"tab","label":"Warm","disabled":false,"info":""},{"id":"3faaa291.62672e","type":"comment","z":"2359a6f.6d6f85a","name":"Батарея в кабинете","info":"","x":240,"y":40,"wires":[]},{"id":"a4b33d28.92113","type":"function","z":"2359a6f.6d6f85a","name":"set current","func":"let z = Number(msg.payload);\nmsg = {\n payload: z,\n topic: 'setCurrent',\n}\nnode.status({fill:\"blue\",shape:\"dot\",text:msg.payload});\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":470,"y":120,"wires":[["e84ca637.d8d478","b55a10cf.c78568"]]},{"id":"53011dcc.f405c4","type":"function","z":"2359a6f.6d6f85a","name":"set target","func":"let z = Number(msg.payload);\nmsg = {\n payload: z,\n topic: 'setTarget',\n}\nnode.status({fill:\"blue\",shape:\"dot\",text:msg.payload });\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":460,"y":220,"wires":[["e84ca637.d8d478","b55a10cf.c78568"]]},{"id":"e84ca637.d8d478","type":"debug","z":"2359a6f.6d6f85a","name":"debug","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":790,"y":120,"wires":[]},{"id":"b55a10cf.c78568","type":"ramp-thermostat","z":"2359a6f.6d6f85a","name":"test","profile":"79f20c8c.fe6764","hysteresisplus":"1","hysteresisminus":"1","x":790,"y":220,"wires":[["d8c8af25.7b31c8"],["bdb90a8a.0b02d8"],["af6efea8.67e878"]]},{"id":"872e9ee6.23ca38","type":"inject","z":"2359a6f.6d6f85a","name":"current temp 21","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"setCurrent","payload":"21","payloadType":"str","x":280,"y":120,"wires":[["a4b33d28.92113"]]},{"id":"9d9d8dca.7732a8","type":"inject","z":"2359a6f.6d6f85a","name":"target","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"setTarget","payload":"25","payloadType":"str","x":290,"y":220,"wires":[["53011dcc.f405c4"]]},{"id":"d8c8af25.7b31c8","type":"debug","z":"2359a6f.6d6f85a","name":"A","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":950,"y":160,"wires":[]},{"id":"bdb90a8a.0b02d8","type":"debug","z":"2359a6f.6d6f85a","name":"B","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":950,"y":220,"wires":[]},{"id":"af6efea8.67e878","type":"debug","z":"2359a6f.6d6f85a","name":"C","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":950,"y":280,"wires":[]},{"id":"b351a6e0.7595a","type":"inject","z":"2359a6f.6d6f85a","name":"hysteresis plus","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1","payloadType":"num","x":260,"y":300,"wires":[["bd34c740.60466"]]},{"id":"bd34c740.60466","type":"function","z":"2359a6f.6d6f85a","name":"set hysteresis plus","func":"let z = Number(msg.payload);\nmsg = {\n payload: z,\n topic: 'setHysteresisPlus',\n}\nnode.status({fill:\"blue\",shape:\"dot\",text:msg.payload });\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":490,"y":300,"wires":[["b55a10cf.c78568","e84ca637.d8d478"]]},{"id":"9e24fb02.4ad3d8","type":"inject","z":"2359a6f.6d6f85a","name":"hysteresis minus","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1","payloadType":"num","x":260,"y":380,"wires":[["4d43a817.260308"]]},{"id":"4d43a817.260308","type":"function","z":"2359a6f.6d6f85a","name":"set hysterisis minus","func":"let z = Number(msg.payload);\nmsg = {\n payload: z,\n topic: 'setHysteresisMinus',\n}\nnode.status({fill:\"blue\",shape:\"dot\",text:msg.payload });\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":490,"y":380,"wires":[["b55a10cf.c78568","e84ca637.d8d478"]]},{"id":"f676a5ad.ec8888","type":"inject","z":"2359a6f.6d6f85a","name":"current temp 27","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"setCurrent","payload":"27","payloadType":"str","x":280,"y":180,"wires":[["a4b33d28.92113"]]},{"id":"79f20c8c.fe6764","type":"profile","name":"test","time1":"00:00","temp1":"10","time2":"23:59","temp2":"10","time3":"","temp3":"","time4":"","temp4":"","time5":"","temp5":"","time6":"","temp6":"","time7":"","temp7":"","time8":"","temp8":"","time9":"","temp9":"","time10":"","temp10":""}]

```

latest demo, promise this is the last for a while

---

<div class="post-metadata">

**Author:** ![NooBAsTiK](https://avatars.discourse-cdn.com/v4/letter/n/67e7ee/32.png) [@NooBAsTiK](https://discourse.nodered.org/u/NooBAsTiK)\
**Post date:** [17 January 2021 21:06 UTC](https://discourse.nodered.org/t/comparison-of-two-temperatures/39239/22 "2021-01-17T21:06:08Z")

</div>

Thank you, but I'll translate and try again tomorrow night.

---

<div class="post-metadata">

**Author:** ![NooBAsTiK](https://avatars.discourse-cdn.com/v4/letter/n/67e7ee/32.png) [@NooBAsTiK](https://discourse.nodered.org/u/NooBAsTiK)\
**Post date:** [18 January 2021 17:26 UTC](https://discourse.nodered.org/t/comparison-of-two-temperatures/39239/23 "2021-01-18T17:26:11Z")

</div>

Thanks. Exactly what you need. I couldn't figure out how to set a msg.topic. I did it by analogy and already at the output I make a replacement for openhab true = on, false = off.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [1 February 2021 17:26 UTC](https://discourse.nodered.org/t/comparison-of-two-temperatures/39239/24 "2021-02-01T17:26:15Z")

</div>

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

[Previous page](https://discourse.nodered.org/t/comparison-of-two-temperatures/39239.md?page=1)
