I was wondering if you can change the switch status via the input msg.payload true/false.
My switch is configured to send "led=on" when switched on and "led=off" when switched off.
Now I'm looking to control the switch status (being on or off) of the switch node input.
When I send payload true or false to the switch it is not reacting.
[
{
"id": "1676caabf9fcc6ab",
"type": "tab",
"label": "Flow 2",
"disabled": false,
"info": "",
"env": []
},
{
"id": "f90a8137d98f0b15",
"type": "ui_switch",
"z": "1676caabf9fcc6ab",
"name": "",
"label": "switch",
"tooltip": "",
"group": "9b4c9f0652de40c1",
"order": 1,
"width": 0,
"height": 0,
"passthru": true,
"decouple": "false",
"topic": "topic",
"topicType": "msg",
"style": "",
"onvalue": "led=on",
"onvalueType": "str",
"onicon": "",
"oncolor": "",
"offvalue": "led=off",
"offvalueType": "str",
"officon": "",
"offcolor": "",
"animate": false,
"className": "",
"x": 430,
"y": 240,
"wires": [
[
"8eb0a96075dbe348"
]
]
},
{
"id": "47c6eb84fc14fa2c",
"type": "inject",
"z": "1676caabf9fcc6ab",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "true",
"payloadType": "bool",
"x": 150,
"y": 160,
"wires": [
[
"f90a8137d98f0b15"
]
]
},
{
"id": "0449832fb66ee4d9",
"type": "inject",
"z": "1676caabf9fcc6ab",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "false",
"payloadType": "bool",
"x": 150,
"y": 300,
"wires": [
[
"f90a8137d98f0b15"
]
]
},
{
"id": "8eb0a96075dbe348",
"type": "debug",
"z": "1676caabf9fcc6ab",
"name": "debug 1",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 620,
"y": 240,
"wires": []
},
{
"id": "9b4c9f0652de40c1",
"type": "ui_group",
"name": "Controls",
"tab": "b2a154f296011832",
"order": 1,
"disp": true,
"width": "6",
"collapse": false,
"className": ""
},
{
"id": "b2a154f296011832",
"type": "ui_tab",
"name": "Home",
"icon": "dashboard",
"order": 1,
"disabled": false,
"hidden": false
}
]