Hi
I want to switch a swich when the payload contains a specific character string. I tested different swich settings without success.
[
{
"id": "9bb8f01a65ff63ce",
"type": "tab",
"label": "Flow 1",
"disabled": false,
"info": "",
"env": []
},
{
"id": "f78742dbb56d0dd1",
"type": "inject",
"z": "9bb8f01a65ff63ce",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 595,
"y": 320,
"wires": [
[
"3c9a49b2a8d9d58f"
]
],
"l": false
},
{
"id": "3bc5aba81ae84f65",
"type": "debug",
"z": "9bb8f01a65ff63ce",
"name": "debug 17",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1045,
"y": 320,
"wires": [],
"l": false
},
{
"id": "58c0f24d71127886",
"type": "tcp in",
"z": "9bb8f01a65ff63ce",
"name": "",
"server": "server",
"host": "",
"port": "3000",
"datamode": "stream",
"datatype": "utf8",
"newline": "",
"topic": "",
"trim": false,
"base64": false,
"tls": "",
"x": 920,
"y": 320,
"wires": [
[
"3bc5aba81ae84f65",
"5812218f1738eafb"
]
]
},
{
"id": "3c9a49b2a8d9d58f",
"type": "tcp out",
"z": "9bb8f01a65ff63ce",
"name": "",
"host": "localhost",
"port": "3000",
"beserver": "client",
"base64": false,
"end": false,
"tls": "",
"x": 740,
"y": 320,
"wires": []
},
{
"id": "5812218f1738eafb",
"type": "api-call-service",
"z": "9bb8f01a65ff63ce",
"name": "",
"server": "f0bc01401120af29",
"version": 5,
"debugenabled": false,
"domain": "input_text",
"service": "set_value",
"areaId": [],
"deviceId": [],
"entityId": [
"input_text.etat_sonnette_portillon"
],
"data": "{\"value\":msg.payload}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 860,
"y": 460,
"wires": [
[
"ca2ebf3e25e2f34f",
"4bcbcf6f4fad09b1"
]
]
},
{
"id": "ca2ebf3e25e2f34f",
"type": "debug",
"z": "9bb8f01a65ff63ce",
"name": "debug 18",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1035,
"y": 460,
"wires": [],
"l": false
},
{
"id": "4bcbcf6f4fad09b1",
"type": "switch",
"z": "9bb8f01a65ff63ce",
"name": "",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "\"Visiteurportillon\"",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 890,
"y": 640,
"wires": [
[
"c2bc8752fb7f8a6f"
],
[]
]
},
{
"id": "c2bc8752fb7f8a6f",
"type": "debug",
"z": "9bb8f01a65ff63ce",
"name": "debug 19",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 1050,
"y": 640,
"wires": []
},
{
"id": "f0bc01401120af29",
"type": "server",
"name": "Home Assistant",
"version": 5,
"addon": false,
"rejectUnauthorizedCerts": true,
"ha_boolean": "y|yes|true|on|home|open",
"connectionDelay": true,
"cacheJson": true,
"heartbeat": false,
"heartbeatInterval": "30",
"areaSelector": "friendlyName",
"deviceSelector": "friendlyName",
"entitySelector": "friendlyName",
"statusSeparator": ": ",
"statusYear": "hidden",
"statusMonth": "short",
"statusDay": "numeric",
"statusHourCycle": "default",
"statusTimeFormat": "h:m",
"enableGlobalContextStore": false
}
]