Inject node 1 should send a notification to change the color of any specific widget (e.g., a button).
how can i achieve this. i tried this way but i could not get the proper output
[
{
"id": "ac6f3d4d92fcb19f",
"type": "group",
"z": "e6e55f4e227f4d8b",
"style": {
"stroke": "#999999",
"stroke-opacity": "1",
"fill": "none",
"fill-opacity": "1",
"label": true,
"label-position": "nw",
"color": "#a4a4a4"
},
"nodes": [
"e83e3dec5ee18fd6",
"27387bd68e4bdf54",
"00d8445c5c3409d4",
"02617a1392b0a5c0",
"806a1a48edca1ad6"
],
"x": 34,
"y": 19,
"w": 672,
"h": 282
},
{
"id": "e83e3dec5ee18fd6",
"type": "ui-button",
"z": "e6e55f4e227f4d8b",
"g": "ac6f3d4d92fcb19f",
"group": "9b23823bcb8a5cde",
"name": "",
"label": "button",
"order": 1,
"width": 0,
"height": 0,
"emulateClick": false,
"tooltip": "",
"color": "",
"bgcolor": "",
"className": "",
"icon": "",
"iconPosition": "left",
"payload": "",
"payloadType": "str",
"topic": "topic",
"topicType": "msg",
"buttonColor": "gray",
"textColor": "",
"iconColor": "",
"enableClick": true,
"enablePointerdown": false,
"pointerdownPayload": "",
"pointerdownPayloadType": "str",
"enablePointerup": false,
"pointerupPayload": "",
"pointerupPayloadType": "str",
"x": 430,
"y": 260,
"wires": [
[
"00d8445c5c3409d4"
]
]
},
{
"id": "27387bd68e4bdf54",
"type": "function",
"z": "e6e55f4e227f4d8b",
"g": "ac6f3d4d92fcb19f",
"name": "function 91",
"func": "msg.ui_control = {\n \"widget\": {\n \"bgcolor\": msg.payload, // Set the background color\n \"color\": \"white\" // Optional: set text color\n }\n};\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 390,
"y": 140,
"wires": [
[
"00d8445c5c3409d4",
"806a1a48edca1ad6"
]
]
},
{
"id": "00d8445c5c3409d4",
"type": "ui-control",
"z": "e6e55f4e227f4d8b",
"g": "ac6f3d4d92fcb19f",
"name": "",
"ui": "64fc71361e24a0d0",
"events": "all",
"x": 600,
"y": 140,
"wires": [
[]
]
},
{
"id": "02617a1392b0a5c0",
"type": "inject",
"z": "e6e55f4e227f4d8b",
"g": "ac6f3d4d92fcb19f",
"name": "Inject Green",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "{\"color\":\"#e91c98\"}",
"payloadType": "json",
"x": 150,
"y": 120,
"wires": [
[
"27387bd68e4bdf54"
]
]
},
{
"id": "806a1a48edca1ad6",
"type": "debug",
"z": "e6e55f4e227f4d8b",
"g": "ac6f3d4d92fcb19f",
"name": "debug 2573",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 590,
"y": 60,
"wires": []
},
{
"id": "9b23823bcb8a5cde",
"type": "ui-group",
"name": "Group Name",
"page": "56e6a566f2912367",
"width": "6",
"height": "1",
"order": 1,
"showTitle": false,
"className": "",
"visible": "true",
"disabled": "false",
"groupType": "default"
},
{
"id": "64fc71361e24a0d0",
"type": "ui-base",
"name": "",
"path": "/dashboard",
"appIcon": "",
"includeClientData": true,
"acceptsClientConfig": [
"ui-notification",
"ui-control",
"ui-template",
"ui-slider",
"ui-text-input",
"ui-button",
"ui-text",
"ui-chart",
"ui-form",
"ui-number-input",
"ui-switch",
"ui-table",
"ui-gauge",
"ui-markdown",
"ui-iframe",
"ui-tabulator",
"ui-radio-group",
"ui-dropdown",
"ui-button-group",
"ui-file-input"
],
"showPathInSidebar": false,
"showPageTitle": false,
"navigationStyle": "icon",
"titleBarStyle": "fixed"
},
{
"id": "56e6a566f2912367",
"type": "ui-page",
"name": "notification",
"ui": "64fc71361e24a0d0",
"path": "/page6",
"icon": "home",
"layout": "grid",
"theme": "default",
"breakpoints": [
{
"name": "Default",
"px": "0",
"cols": "3"
},
{
"name": "Tablet",
"px": "576",
"cols": "6"
},
{
"name": "Small Desktop",
"px": "768",
"cols": "9"
},
{
"name": "Desktop",
"px": "1024",
"cols": "12"
}
],
"order": 3,
"className": "",
"visible": "true",
"disabled": "false"
}
]