I found an approach based on a context status (which distinguishes which of the thermostats is master/slave). Let me know if there is a more better, more clever solution. Since this is also a situation which I need to solve for own purposes...
Regards from Berlin
[
{
"id": "1f2c27eef130dd63",
"type": "inject",
"z": "8c0dae24.8d305",
"name": "TH1 15°C",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "15",
"payloadType": "num",
"x": 310,
"y": 1500,
"wires": [
[
"9d0ac5763610abec",
"8d40c3fcb45a5738"
]
]
},
{
"id": "3c3ab2fa498fc76d",
"type": "change",
"z": "8c0dae24.8d305",
"name": "TH1",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 750,
"y": 1500,
"wires": [
[
"9d3737f21517ac72",
"f9792735685d4a84"
]
]
},
{
"id": "d99210759eab716c",
"type": "inject",
"z": "8c0dae24.8d305",
"name": "TH1 30°C",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "30",
"payloadType": "num",
"x": 310,
"y": 1550,
"wires": [
[
"9d0ac5763610abec",
"8d40c3fcb45a5738"
]
]
},
{
"id": "b852afadd8ce0bd7",
"type": "debug",
"z": "8c0dae24.8d305",
"name": "debug 25",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 1180,
"y": 1500,
"wires": []
},
{
"id": "9d3737f21517ac72",
"type": "change",
"z": "8c0dae24.8d305",
"name": "generate string",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "\"TH1: \" & $round(payload,1) & \" °C\"",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 950,
"y": 1500,
"wires": [
[
"b852afadd8ce0bd7"
]
]
},
{
"id": "e818830c7fbca9b7",
"type": "inject",
"z": "8c0dae24.8d305",
"name": "TH2 18°C",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "18",
"payloadType": "num",
"x": 310,
"y": 1700,
"wires": [
[
"b1f590fcf544cce6",
"bd0ce751311967b9"
]
]
},
{
"id": "0b4f9dd898cc88a7",
"type": "change",
"z": "8c0dae24.8d305",
"name": "TH2",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 750,
"y": 1700,
"wires": [
[
"aad148b13af5092c",
"1080d434363aa06f"
]
]
},
{
"id": "6faa62222e7814dd",
"type": "inject",
"z": "8c0dae24.8d305",
"name": "TH2 25°C",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "25",
"payloadType": "num",
"x": 310,
"y": 1750,
"wires": [
[
"b1f590fcf544cce6",
"bd0ce751311967b9"
]
]
},
{
"id": "ec52be26f0b9578e",
"type": "debug",
"z": "8c0dae24.8d305",
"name": "debug 27",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 1180,
"y": 1700,
"wires": []
},
{
"id": "aad148b13af5092c",
"type": "change",
"z": "8c0dae24.8d305",
"name": "generate string",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "\"TH2: \" & $round(payload,1) & \" °C\"",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 950,
"y": 1700,
"wires": [
[
"ec52be26f0b9578e"
]
]
},
{
"id": "9d0ac5763610abec",
"type": "change",
"z": "8c0dae24.8d305",
"name": "set TH1 as master",
"rules": [
{
"t": "set",
"p": "TH1",
"pt": "flow",
"to": "master",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 550,
"y": 1500,
"wires": [
[
"3c3ab2fa498fc76d"
]
]
},
{
"id": "bd0ce751311967b9",
"type": "change",
"z": "8c0dae24.8d305",
"name": "set TH1 as slave",
"rules": [
{
"t": "set",
"p": "TH1",
"pt": "flow",
"to": "slave",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 550,
"y": 1750,
"wires": [
[]
]
},
{
"id": "b1f590fcf544cce6",
"type": "change",
"z": "8c0dae24.8d305",
"name": "set TH2 as master",
"rules": [
{
"t": "set",
"p": "TH2",
"pt": "flow",
"to": "master",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 550,
"y": 1700,
"wires": [
[
"0b4f9dd898cc88a7"
]
]
},
{
"id": "8d40c3fcb45a5738",
"type": "change",
"z": "8c0dae24.8d305",
"name": "set TH2 as slave",
"rules": [
{
"t": "set",
"p": "TH2",
"pt": "flow",
"to": "slave",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 550,
"y": 1550,
"wires": [
[]
]
},
{
"id": "1080d434363aa06f",
"type": "switch",
"z": "8c0dae24.8d305",
"name": "only if TH1 = slave",
"property": "TH1",
"propertyType": "flow",
"rules": [
{
"t": "eq",
"v": "slave",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 960,
"y": 1650,
"wires": [
[
"3c3ab2fa498fc76d"
]
]
},
{
"id": "f9792735685d4a84",
"type": "switch",
"z": "8c0dae24.8d305",
"name": "only if TH2 = slave",
"property": "TH2",
"propertyType": "flow",
"rules": [
{
"t": "eq",
"v": "slave",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 960,
"y": 1550,
"wires": [
[
"0b4f9dd898cc88a7"
]
]
}
]