Import this in Node-Red to give you an idea.
[{“id”:“42b077e23bac54a6”,“type”:“server-state-changed”,“z”:“25f5f33873f169c4”,“name”:“Someone changed room 2 thermostat”,“server”:“e447e3557e0eea14”,“version”:3,“exposeToHomeAssistant”:false,“haConfig”:[{“property”:“name”,“value”:""},{“property”:“icon”,“value”:""}],“entityidfilter”:"",“entityidfiltertype”:“exact”,“outputinitially”:false,“state_type”:“str”,“haltifstate”:"",“halt_if_type”:“str”,“halt_if_compare”:“is”,“outputs”:1,“output_only_on_state_change”:true,“for”:0,“forType”:“num”,“forUnits”:“minutes”,“ignorePrevStateNull”:false,“ignorePrevStateUnknown”:false,“ignorePrevStateUnavailable”:false,“ignoreCurrentStateUnknown”:false,“ignoreCurrentStateUnavailable”:false,“outputProperties”:[{“property”:“payload”,“propertyType”:“msg”,“value”:"",“valueType”:“entityState”},{“property”:“data”,“propertyType”:“msg”,“value”:"",“valueType”:“eventData”},{“property”:“topic”,“propertyType”:“msg”,“value”:"",“valueType”:“triggerId”}],“x”:170,“y”:340,“wires”:[[“b826afd9a956fca1”]]},{“id”:“b826afd9a956fca1”,“type”:“function”,“z”:“25f5f33873f169c4”,“name”:“maybe do some calculations and send a temperature”,“func”:"\nreturn msg;",“outputs”:1,“noerr”:0,“initialize”:"",“finalize”:"",“libs”:[],“x”:280,“y”:400,“wires”:[[“cd1646b2012b4135”,“368957bfe2a23e06”,“0240983bfe0195fa”]]},{“id”:“cd1646b2012b4135”,“type”:“api-call-service”,“z”:“25f5f33873f169c4”,“name”:“call a service to set a temperature on radiator 1 in room 2”,“server”:“e447e3557e0eea14”,“version”:3,“debugenabled”:false,“service_domain”:"",“service”:"",“entityId”:"",“data”:"",“dataType”:“jsonata”,“mergecontext”:"",“mustacheAltTags”:false,“outputProperties”:[],“queue”:“none”,“x”:730,“y”:360,“wires”:[[“ca0d4a56f75fdade”]]},{“id”:“368957bfe2a23e06”,“type”:“api-call-service”,“z”:“25f5f33873f169c4”,“name”:“call a service to set a temperature on radiator 2 in room 2”,“server”:“e447e3557e0eea14”,“version”:3,“debugenabled”:false,“service_domain”:"",“service”:"",“entityId”:"",“data”:"",“dataType”:“jsonata”,“mergecontext”:"",“mustacheAltTags”:false,“outputProperties”:[],“queue”:“none”,“x”:730,“y”:400,“wires”:[[“ca0d4a56f75fdade”]]},{“id”:“0240983bfe0195fa”,“type”:“api-call-service”,“z”:“25f5f33873f169c4”,“name”:“call a service to set a temperature on radiator 3 in room 2”,“server”:“e447e3557e0eea14”,“version”:3,“debugenabled”:false,“service_domain”:"",“service”:"",“entityId”:"",“data”:"",“dataType”:“jsonata”,“mergecontext”:"",“mustacheAltTags”:false,“outputProperties”:[],“queue”:“none”,“x”:730,“y”:440,“wires”:[[“ca0d4a56f75fdade”]]},{“id”:“057db9044f3280dd”,“type”:“server-state-changed”,“z”:“25f5f33873f169c4”,“name”:“Someone changed room 1 thermostat”,“server”:“e447e3557e0eea14”,“version”:3,“exposeToHomeAssistant”:false,“haConfig”:[{“property”:“name”,“value”:""},{“property”:“icon”,“value”:""}],“entityidfilter”:"",“entityidfiltertype”:“exact”,“outputinitially”:false,“state_type”:“str”,“haltifstate”:"",“halt_if_type”:“str”,“halt_if_compare”:“is”,“outputs”:1,“output_only_on_state_change”:true,“for”:0,“forType”:“num”,“forUnits”:“minutes”,“ignorePrevStateNull”:false,“ignorePrevStateUnknown”:false,“ignorePrevStateUnavailable”:false,“ignoreCurrentStateUnknown”:false,“ignoreCurrentStateUnavailable”:false,“outputProperties”:[{“property”:“payload”,“propertyType”:“msg”,“value”:"",“valueType”:“entityState”},{“property”:“data”,“propertyType”:“msg”,“value”:"",“valueType”:“eventData”},{“property”:“topic”,“propertyType”:“msg”,“value”:"",“valueType”:“triggerId”}],“x”:170,“y”:140,“wires”:[[“a8d10eff0f61aee1”]]},{“id”:“a8d10eff0f61aee1”,“type”:“function”,“z”:“25f5f33873f169c4”,“name”:“maybe do some calculations and send a temperature”,“func”:"\nreturn msg;",“outputs”:1,“noerr”:0,“initialize”:"",“finalize”:"",“libs”:[],“x”:280,“y”:200,“wires”:[[“7735b5f450fb0b22”,“2389ac2e6d2e31a0”,“8feca2f243cfc982”]]},{“id”:“7735b5f450fb0b22”,“type”:“api-call-service”,“z”:“25f5f33873f169c4”,“name”:“call a service to set a temperature on radiator 1 in room 1”,“server”:“e447e3557e0eea14”,“version”:3,“debugenabled”:false,“service_domain”:"",“service”:"",“entityId”:"",“data”:"",“dataType”:“jsonata”,“mergecontext”:"",“mustacheAltTags”:false,“outputProperties”:[],“queue”:“none”,“x”:730,“y”:160,“wires”:[[“ca0d4a56f75fdade”]]},{“id”:“2389ac2e6d2e31a0”,“type”:“api-call-service”,“z”:“25f5f33873f169c4”,“name”:“call a service to set a temperature on radiator 2 in room 1”,“server”:“e447e3557e0eea14”,“version”:3,“debugenabled”:false,“service_domain”:"",“service”:"",“entityId”:"",“data”:"",“dataType”:“jsonata”,“mergecontext”:"",“mustacheAltTags”:false,“outputProperties”:[],“queue”:“none”,“x”:730,“y”:200,“wires”:[[“ca0d4a56f75fdade”]]},{“id”:“8feca2f243cfc982”,“type”:“api-call-service”,“z”:“25f5f33873f169c4”,“name”:“call a service to set a temperature on radiator 3 in room 1”,“server”:“e447e3557e0eea14”,“version”:3,“debugenabled”:false,“service_domain”:"",“service”:"",“entityId”:"",“data”:"",“dataType”:“jsonata”,“mergecontext”:"",“mustacheAltTags”:false,“outputProperties”:[],“queue”:“none”,“x”:730,“y”:240,“wires”:[[“ca0d4a56f75fdade”]]},{“id”:“ca0d4a56f75fdade”,“type”:“api-current-state”,“z”:“25f5f33873f169c4”,“name”:“pull state of heating on thermostat in room 1”,“server”:“e447e3557e0eea14”,“version”:2,“outputs”:1,“halt_if”:"",“halt_if_type”:“str”,“halt_if_compare”:“is”,“entity_id”:"",“state_type”:“str”,“blockInputOverrides”:false,“outputProperties”:[{“property”:“payload”,“propertyType”:“msg”,“value”:"",“valueType”:“entityState”},{“property”:“data”,“propertyType”:“msg”,“value”:"",“valueType”:“entity”}],“override_topic”:false,“state_location”:“payload”,“override_payload”:“msg”,“entity_location”:“data”,“override_data”:“msg”,“x”:1170,“y”:160,“wires”:[[“a30341956341d23d”]]},{“id”:“a30341956341d23d”,“type”:“function”,“z”:“25f5f33873f169c4”,“name”:“Do some calculations to get a boolean value (yes/no, heating/no heating, over/under or whatever))”,“func”:"\nreturn msg;",“outputs”:1,“noerr”:0,“initialize”:"",“finalize”:"",“libs”:[],“x”:1380,“y”:220,“wires”:[[“58d6ba6cc9def58c”]]},{“id”:“9b09cb41c06ebbda”,“type”:“function”,“z”:“25f5f33873f169c4”,“name”:“Do some calculations to get a boolean value (yes/no, heating/no heating, over/under or whatever))”,“func”:"\nreturn msg;",“outputs”:1,“noerr”:0,“initialize”:"",“finalize”:"",“libs”:[],“x”:1380,“y”:560,“wires”:[[“594f4fd1025a90b3”]]},{“id”:“578775b9e2577b80”,“type”:“api-current-state”,“z”:“25f5f33873f169c4”,“name”:“pull state of heating on thermostat in room 1”,“server”:“e447e3557e0eea14”,“version”:2,“outputs”:1,“halt_if”:"",“halt_if_type”:“str”,“halt_if_compare”:“is”,“entity_id”:"",“state_type”:“str”,“blockInputOverrides”:false,“outputProperties”:[{“property”:“payload”,“propertyType”:“msg”,“value”:"",“valueType”:“entityState”},{“property”:“data”,“propertyType”:“msg”,“value”:"",“valueType”:“entity”}],“override_topic”:false,“state_location”:“payload”,“override_payload”:“msg”,“entity_location”:“data”,“override_data”:“msg”,“x”:1170,“y”:500,“wires”:[[“9b09cb41c06ebbda”]]},{“id”:“58d6ba6cc9def58c”,“type”:“switch”,“z”:“25f5f33873f169c4”,“name”:“heating?”,“property”:“payload”,“propertyType”:“msg”,“rules”:[{“t”:“eq”,“v”:“yes”,“vt”:“str”},{“t”:“eq”,“v”:“no”,“vt”:“str”}],“checkall”:“true”,“repair”:false,“outputs”:2,“x”:1130,“y”:280,“wires”:[[“bf67485d79f67aa0”],[“578775b9e2577b80”]]},{“id”:“594f4fd1025a90b3”,“type”:“switch”,“z”:“25f5f33873f169c4”,“name”:“heating?”,“property”:“payload”,“propertyType”:“msg”,“rules”:[{“t”:“eq”,“v”:“yes”,“vt”:“str”},{“t”:“eq”,“v”:“no”,“vt”:“str”}],“checkall”:“true”,“repair”:false,“outputs”:2,“x”:1140,“y”:620,“wires”:[[“bf67485d79f67aa0”],[“08e2593403179c08”]]},{“id”:“08e2593403179c08”,“type”:“api-call-service”,“z”:“25f5f33873f169c4”,“name”:“No thermostats are requiring heating, so Boiler OFF!”,“server”:“e447e3557e0eea14”,“version”:3,“debugenabled”:false,“service_domain”:"",“service”:"",“entityId”:"",“data”:"",“dataType”:“jsonata”,“mergecontext”:"",“mustacheAltTags”:false,“outputProperties”:[],“queue”:“none”,“x”:1540,“y”:720,“wires”:[[]]},{“id”:“bf67485d79f67aa0”,“type”:“api-call-service”,“z”:“25f5f33873f169c4”,“name”:“Boiler ON!”,“server”:“e447e3557e0eea14”,“version”:3,“debugenabled”:false,“service_domain”:"",“service”:"",“entityId”:"",“data”:"",“dataType”:“jsonata”,“mergecontext”:"",“mustacheAltTags”:false,“outputProperties”:[],“queue”:“none”,“x”:2070,“y”:600,“wires”:[[]]},{“id”:“e447e3557e0eea14”,“type”:“server”,“name”:“test”,“version”:1,“legacy”:false,“addon”:false,“rejectUnauthorizedCerts”:true,“ha_boolean”:“y|yes|true|on|home|open”,“connectionDelay”:true,“cacheJson”:true,“credentials”:{“host”:“127.0.0.1:8123”,“access_token”:""}}]