@mike1976
Hi, oder 2 get Node, im ersten Atribut auf tem1 im zweiten auf temp2 und dann msg.tem1 und msg.temp2 vergleichen. Und beide Input auf die Get Nodes.
[
{
"id": "c962ba01.a791e8",
"type": "ioBroker in",
"z": "523fbe1.477244",
"name": "",
"topic": "0_userdata.0.Temp_1",
"payloadType": "value",
"onlyack": "",
"func": "all",
"gap": "",
"x": 160,
"y": 380,
"wires": [
[
"2770d4dd.08c1cc"
]
]
},
{
"id": "486d7a56.2eac24",
"type": "function",
"z": "523fbe1.477244",
"name": "test",
"func": "if(msg.temp1 == msg.temp2) {\n msg.payload = 1;\n } \n\nelse {\n msg.payload = 0;\n}\nreturn msg;\n",
"outputs": 1,
"noerr": 0,
"x": 770,
"y": 440,
"wires": [
[
"3d08a978.d14ac6"
]
]
},
{
"id": "3d08a978.d14ac6",
"type": "debug",
"z": "523fbe1.477244",
"name": "ergebnis",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"x": 920,
"y": 440,
"wires": []
},
{
"id": "860b7de7.571d6",
"type": "ioBroker get",
"z": "523fbe1.477244",
"name": "",
"topic": "0_userdata.0.Temp_2",
"attrname": "temp2",
"payloadType": "value",
"x": 600,
"y": 420,
"wires": [
[
"486d7a56.2eac24"
]
]
},
{
"id": "cf6394e8.f0d808",
"type": "ioBroker in",
"z": "523fbe1.477244",
"name": "",
"topic": "0_userdata.0.Temp_2",
"payloadType": "value",
"onlyack": "",
"func": "all",
"gap": "",
"x": 140,
"y": 480,
"wires": [
[
"2770d4dd.08c1cc"
]
]
},
{
"id": "2770d4dd.08c1cc",
"type": "ioBroker get",
"z": "523fbe1.477244",
"name": "",
"topic": "0_userdata.0.Temp_1",
"attrname": "temp1",
"payloadType": "value",
"x": 360,
"y": 420,
"wires": [
[
"860b7de7.571d6"
]
]
}
]