I shall share my settings:
I use a Plugwise Anna thermostat, but I think the needed syntax is about the same. Looks like this:
The nodes schematic looks like this:
It’s a bit overcomplicated, but I shall try to explain why I did it this way:
I use to have a slider to set the temperature. But I discovered that when using touch screens two big temperature up and down where way more convenient to set the temperature. (Just two quick touches to increase it with 1 degree). The display shows the current set temperature, but the communication of the Homey / Thermostat lags too much to see the changes in real time. (It’s annoying if you want to set the temperature and have to wait a second to see what you’ve selected) So I added a timer that instantly increases the value and shows it immediately on the display. After the time out it shows the set temperature from the thermostat again (in case you set the temperature outside of the node-red dashboard).
It also waits two seconds of “not pressing the button” to send the new temperature, otherwise the thermostat gets overwhelmed with the quick changes.
Another thing I incorporated is a little red flame and a change of colour of the thermometer icon to red when the heater is heating. (boiler status).
This is all combined in a html-node for formatting.
Like I said, it’s a bit complicated for a beginner, you could begin with the simple inc and dec (to add or subtract 0,5 degree).
Here’s the full Json if you want to try my code (or study):
[{"id":"958d3128.f703d","type":"mqtt in","z":"3fc6989f.e74748","name":"Set Temperature","topic":"homie/homey-topic/kachel/target-temperature","qos":"2","datatype":"auto","broker":"d776df12.63afa","x":120,"y":320,"wires":[["8f3a8a15.e12cc"]]},{"id":"768592fa.bd0844","type":"mqtt out","z":"3fc6989f.e74748","name":"Target kamertemperatuur","topic":"homie/homey-topic/kachel/target-temperature/set","qos":"","retain":"","broker":"d776df12.63afa","x":970,"y":180,"wires":[]},{"id":"3919e4f2.08665c","type":"ui_button","z":"3fc6989f.e74748","name":"Temperature up","group":"3468ee74.04285a","order":3,"width":3,"height":2,"passthru":false,"label":"","tooltip":"","color":"","bgcolor":"","icon":"fa-4x fa-fire","payload":"0.5","payloadType":"num","topic":"Up","x":120,"y":240,"wires":[["46913fed.3edac8"]]},{"id":"42d42408.779b24","type":"ui_button","z":"3fc6989f.e74748","name":"Temperature down","group":"3468ee74.04285a","order":2,"width":3,"height":2,"passthru":false,"label":"","tooltip":"","color":"","bgcolor":"","icon":"fa-4x fa-snowflake-o","payload":"-0.5","payloadType":"num","topic":"","x":130,"y":180,"wires":[["46913fed.3edac8"]]},{"id":"8f3a8a15.e12cc","type":"function","z":"3fc6989f.e74748","name":"Store Value Global","func":"var DelaySetTemperature=flow.get('DelaySetTemperature') || false;\n\nif (DelaySetTemperature)\n{\n \n \n} else\n{\n var SetTemperature=flow.get('SetTemperature') || \"10\"; \n flow.set('SetTemperature',msg.payload);\n return msg; \n}\n\n\n\n\n","outputs":1,"noerr":0,"x":370,"y":320,"wires":[["f0eb83ba.ae27b8"]]},{"id":"46913fed.3edac8","type":"function","z":"3fc6989f.e74748","name":"Inc and Dec","func":"var Temperature=flow.get('SetTemperature')|| '10'; \nvar IncDec = msg.payload; \n\n\nvar DelaySetTemperature=flow.get('DelaySetTemperature') || true;\nflow.set('DelaySetTemperature',true);\n\nmsg.payload=(parseFloat(Temperature)+IncDec).toString();\nflow.set('SetTemperature',msg.payload);\nreturn msg; // SetTemperature;","outputs":1,"noerr":0,"x":370,"y":200,"wires":[["7a8dfc1e.5a069c","b4854a8d.1c6218","f0eb83ba.ae27b8"]]},{"id":"cddd0bd7.de57f","type":"function","z":"3fc6989f.e74748","name":"Disable delay","func":"var DelaySetTemperature=flow.get('DelaySetTemperature') || false;\nflow.set('DelaySetTemperature',false);\nreturn msg;","outputs":1,"noerr":0,"x":940,"y":240,"wires":[[]]},{"id":"7a8dfc1e.5a069c","type":"stoptimer","z":"3fc6989f.e74748","duration":"4","units":"Second","payloadtype":"num","payloadval":"0","name":"","x":620,"y":240,"wires":[["cddd0bd7.de57f"],[]]},{"id":"b4854a8d.1c6218","type":"stoptimer","z":"3fc6989f.e74748","duration":"2","units":"Second","payloadtype":"num","payloadval":"0","name":"","x":620,"y":180,"wires":[["768592fa.bd0844"],[]]},{"id":"58803de2.f99984","type":"mqtt in","z":"3fc6989f.e74748","name":"Boiler status","topic":"homie/homey-topic/kachel/boiler-state","qos":"2","datatype":"auto","broker":"d776df12.63afa","x":110,"y":380,"wires":[["b67f4cf2.1e776"]]},{"id":"b67f4cf2.1e776","type":"function","z":"3fc6989f.e74748","name":"Convert String to inverted Boolean","func":"var BoilerState=global.get(\"BoilerState\") || false;\n\n\nif(msg.payload === \"true\"){\n global.set(\"BoilerState\",true);\n}else{\n global.set(\"BoilerState\",false);\n}\nreturn msg;","outputs":1,"noerr":0,"x":660,"y":380,"wires":[["cb755ecb.ca031"]]},{"id":"2223a1f7.ec2d1e","type":"ui_template","z":"3fc6989f.e74748","group":"3468ee74.04285a","name":"Target temperature","order":1,"width":6,"height":2,"format":"<p style=\"text-align: center\">Ingestelde temperatuur</p>\n<p class='temperature' style=\"font-size:54px; text-align: center; font-weight: bold;\"> <i style=\"color:{{msg.Iconcolor}}!important;\" class=\"fa fa-thermometer-three-quarters\" aria-hidden=\"true\"></i>\n{{msg.payload}}°<i style=\"color:{{msg.Iconcolor}}!important; font-size:25px; \" class=\"{{msg.IconFlame}}\" aria-hidden=\"true\"></i></p>\n","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":1270,"y":340,"wires":[[]]},{"id":"cb755ecb.ca031","type":"function","z":"3fc6989f.e74748","name":"Set icon color and temperature","func":"var BoilerState=global.get(\"BoilerState\") || false;\nvar SetTemperature=global.get(\"SetTemperature\") || 0;\nvar flame=\"\";\n\nvar Boilercolor=\"#0094CE\";\nif (BoilerState){\n Boilercolor=\"#CE2323\"; \n flame=\"fa fa-fire\";\n // flame=\" <i style=\\\"color:#CE2323!important;\\\" class=\\\"fa fa-fire\\\" aria-hidden=\\\"true\\\"></i>\"\n}\n\nmsg = {payload:SetTemperature, Iconcolor:Boilercolor, IconFlame:flame};\n//msg = {payload:SetTemperature, Iconcolor:Boilercolor};\nreturn msg;","outputs":1,"noerr":0,"x":990,"y":340,"wires":[["2223a1f7.ec2d1e"]]},{"id":"f0eb83ba.ae27b8","type":"function","z":"3fc6989f.e74748","name":"Store Set temperature in global","func":"var SetTemperature=global.get(\"SetTemperature\") || 0;\nglobal.set(\"SetTemperature\",msg.payload);\nreturn msg;","outputs":1,"noerr":0,"x":650,"y":320,"wires":[["cb755ecb.ca031"]]},{"id":"d776df12.63afa","type":"mqtt-broker","z":"","name":"Homey MQTT","broker":"192.168.178.26","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"3468ee74.04285a","type":"ui_group","z":"","name":"Klimaat","tab":"f735aa47.f5cd18","order":4,"disp":true,"width":"6","collapse":false},{"id":"f735aa47.f5cd18","type":"ui_tab","z":"","name":"Homey Dashboard","icon":"dashboard","order":1,"disabled":false,"hidden":false}]