[
{
"id": "d0c6fba4707a4e76",
"type": "change",
"z": "54b226bc.0793e8",
"name": "",
"rules": [
{
"t": "set",
"p": "key",
"pt": "msg",
"to": "topic",
"tot": "msg"
},
{
"t": "change",
"p": "key",
"pt": "msg",
"from": ".*\\.(.*)$",
"fromt": "re",
"to": "$1",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 590,
"y": 2780,
"wires": [
[
"158ec84a1b8fc50c"
]
]
},
{
"id": "158ec84a1b8fc50c",
"type": "switch",
"z": "54b226bc.0793e8",
"name": "",
"property": "key",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "temperature",
"vt": "str"
},
{
"t": "eq",
"v": "humidity",
"vt": "str"
},
{
"t": "else"
}
],
"checkall": "true",
"repair": false,
"outputs": 3,
"x": 770,
"y": 2780,
"wires": [
[
"e73b7b8152f09240"
],
[
"f97af63bc52b6f0c"
],
[
"46cc9ab14e59223b"
]
]
},
{
"id": "e73b7b8152f09240",
"type": "change",
"z": "54b226bc.0793e8",
"name": "",
"rules": [
{
"t": "set",
"p": "stateUnit",
"pt": "msg",
"to": "°C",
"tot": "str"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "payload = \"\" ? 0 : $number(payload)",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 950,
"y": 2740,
"wires": [
[
"4f135de5123e98f1"
]
]
},
{
"id": "f97af63bc52b6f0c",
"type": "change",
"z": "54b226bc.0793e8",
"name": "",
"rules": [
{
"t": "set",
"p": "stateUnit",
"pt": "msg",
"to": "%",
"tot": "str"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "payload = \"\" ? 0 : $number(payload)",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 950,
"y": 2780,
"wires": [
[
"4f135de5123e98f1"
]
]
},
{
"id": "46cc9ab14e59223b",
"type": "change",
"z": "54b226bc.0793e8",
"name": "do nothing",
"rules": [],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 950,
"y": 2820,
"wires": [
[
"4f135de5123e98f1"
]
]
}
]