Disable widgets

So the issue is still the same as I mentioned at the beginning.

You are still feeding msg.payload true / false back into the drop down. I keep removing this and you keep adding it back in, with more and more unnecessary nodes :wink:

NOTE: If you add a property to a msg (eg enabled), this doesn't remove the existing property of msg.payload. The problem you are seeing is because you send enable property AND payload property in the SAME message, so the drop down reacts to both.

If you send msg.enabled to the dropdown and don't want to change the value displayed, then you need to delete the msg.payload property first.

I have modified you flow to correct this and hopefully you can now see what you need to do :wink:

[
    {
        "id": "c3be85b95be91e89",
        "type": "ui_dropdown",
        "z": "d0f9a690e04bf3cd",
        "name": "",
        "label": "REMOTE:",
        "tooltip": "Activates Remote-control. Unable to control Pump when OFF",
        "place": "",
        "group": "4368da8fe6ddbe0c",
        "order": 1,
        "width": 4,
        "height": 1,
        "passthru": true,
        "multiple": false,
        "options": [
            {
                "label": "ON",
                "value": true,
                "type": "bool"
            },
            {
                "label": "OFF",
                "value": false,
                "type": "bool"
            }
        ],
        "payload": "",
        "topic": "test",
        "topicType": "msg",
        "className": "",
        "x": 505,
        "y": 720,
        "wires": [
            [
                "fbdf668d81828a94"
            ]
        ]
    },
    {
        "id": "c36f9376d47c9f21",
        "type": "change",
        "z": "d0f9a690e04bf3cd",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "input_remote",
                "pt": "flow",
                "to": "payload",
                "tot": "msg"
            },
            {
                "t": "set",
                "p": "background",
                "pt": "msg",
                "to": "rgb(255, 51, 51)",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 810,
        "y": 720,
        "wires": [
            [
                "93cdd11b59f438af"
            ]
        ]
    },
    {
        "id": "93cdd11b59f438af",
        "type": "ui_button",
        "z": "d0f9a690e04bf3cd",
        "name": "check_remote",
        "group": "4368da8fe6ddbe0c",
        "order": 2,
        "width": 1,
        "height": 1,
        "passthru": false,
        "label": "",
        "tooltip": "",
        "color": "white",
        "bgcolor": "{{background}}",
        "className": "",
        "icon": "fa-check",
        "payload": "",
        "payloadType": "str",
        "topic": "topic",
        "topicType": "msg",
        "x": 1030,
        "y": 720,
        "wires": [
            [
                "5fab407077ae83a8",
                "9c293200e2d4fb91"
            ]
        ]
    },
    {
        "id": "4b9452657fcc1d6a",
        "type": "change",
        "z": "d0f9a690e04bf3cd",
        "name": "set drop down value",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "input_dosing",
                "tot": "flow"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 290,
        "y": 870,
        "wires": [
            [
                "53c8ef23430cd71a"
            ]
        ]
    },
    {
        "id": "53c8ef23430cd71a",
        "type": "ui_dropdown",
        "z": "d0f9a690e04bf3cd",
        "name": "",
        "label": "DOSING:",
        "tooltip": "Starts or stops the pump",
        "place": "",
        "group": "4368da8fe6ddbe0c",
        "order": 4,
        "width": 4,
        "height": 1,
        "passthru": true,
        "multiple": false,
        "options": [
            {
                "label": "START",
                "value": true,
                "type": "bool"
            },
            {
                "label": "STOP",
                "value": false,
                "type": "bool"
            }
        ],
        "payload": "",
        "topic": "topic",
        "topicType": "msg",
        "className": "",
        "x": 510,
        "y": 900,
        "wires": [
            [
                "73d7dd197aac9352"
            ]
        ]
    },
    {
        "id": "aeac7511c51d451e",
        "type": "ui_button",
        "z": "d0f9a690e04bf3cd",
        "name": "input_dosing",
        "group": "4368da8fe6ddbe0c",
        "order": 5,
        "width": 1,
        "height": 1,
        "passthru": false,
        "label": "",
        "tooltip": "",
        "color": "white",
        "bgcolor": "{{background}}",
        "className": "",
        "icon": "fa-check",
        "payload": "",
        "payloadType": "str",
        "topic": "topic",
        "topicType": "msg",
        "x": 1040,
        "y": 900,
        "wires": [
            [
                "a41e37df0a74a3b9",
                "42a8ebb92f2c7159"
            ]
        ]
    },
    {
        "id": "a41e37df0a74a3b9",
        "type": "change",
        "z": "d0f9a690e04bf3cd",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "input_dosing",
                "tot": "flow"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1250,
        "y": 900,
        "wires": [
            [
                "85aaec73340d36b7"
            ]
        ]
    },
    {
        "id": "e84faf494ba5d4d9",
        "type": "change",
        "z": "d0f9a690e04bf3cd",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "readPump.CIM500/ADR_201.ActRemoteAccess",
                "tot": "flow"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 295,
        "y": 720,
        "wires": [
            [
                "c3be85b95be91e89"
            ]
        ]
    },
    {
        "id": "fbdf668d81828a94",
        "type": "rbe",
        "z": "d0f9a690e04bf3cd",
        "name": "",
        "func": "rbe",
        "gap": "",
        "start": "",
        "inout": "out",
        "septopics": true,
        "property": "payload",
        "topi": "topic",
        "x": 655,
        "y": 720,
        "wires": [
            [
                "c36f9376d47c9f21"
            ]
        ]
    },
    {
        "id": "e21c0a6cbbde2576",
        "type": "change",
        "z": "d0f9a690e04bf3cd",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "readPump.CIM500/ADR_204.Dosing",
                "tot": "flow"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 310,
        "y": 930,
        "wires": [
            [
                "53c8ef23430cd71a"
            ]
        ]
    },
    {
        "id": "73d7dd197aac9352",
        "type": "rbe",
        "z": "d0f9a690e04bf3cd",
        "name": "",
        "func": "rbe",
        "gap": "",
        "start": "",
        "inout": "out",
        "septopics": true,
        "property": "payload",
        "topi": "topic",
        "x": 655,
        "y": 900,
        "wires": [
            [
                "e56de83b334c130d"
            ]
        ]
    },
    {
        "id": "5fab407077ae83a8",
        "type": "change",
        "z": "d0f9a690e04bf3cd",
        "name": "change button black",
        "rules": [
            {
                "t": "set",
                "p": "background",
                "pt": "msg",
                "to": "black",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1025,
        "y": 645,
        "wires": [
            [
                "93cdd11b59f438af"
            ]
        ]
    },
    {
        "id": "9c293200e2d4fb91",
        "type": "change",
        "z": "d0f9a690e04bf3cd",
        "name": "set enabled state",
        "rules": [
            {
                "t": "set",
                "p": "enabled",
                "pt": "msg",
                "to": "input_remote",
                "tot": "flow"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1245,
        "y": 720,
        "wires": [
            [
                "4b9452657fcc1d6a"
            ]
        ]
    },
    {
        "id": "e56de83b334c130d",
        "type": "change",
        "z": "d0f9a690e04bf3cd",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "input_dosing",
                "pt": "flow",
                "to": "payload",
                "tot": "msg"
            },
            {
                "t": "set",
                "p": "background",
                "pt": "msg",
                "to": "rgb(255, 51, 51)",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 815,
        "y": 900,
        "wires": [
            [
                "aeac7511c51d451e"
            ]
        ]
    },
    {
        "id": "42a8ebb92f2c7159",
        "type": "change",
        "z": "d0f9a690e04bf3cd",
        "name": "change button black",
        "rules": [
            {
                "t": "set",
                "p": "background",
                "pt": "msg",
                "to": "black",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1045,
        "y": 825,
        "wires": [
            [
                "aeac7511c51d451e"
            ]
        ]
    },
    {
        "id": "85aaec73340d36b7",
        "type": "debug",
        "z": "d0f9a690e04bf3cd",
        "name": "input_dosing",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1520,
        "y": 900,
        "wires": []
    },
    {
        "id": "4368da8fe6ddbe0c",
        "type": "ui_group",
        "name": "CONTROLPANEL",
        "tab": "4ad3c40739cbf998",
        "order": 2,
        "disp": true,
        "width": 8,
        "collapse": false,
        "className": ""
    },
    {
        "id": "4ad3c40739cbf998",
        "type": "ui_tab",
        "name": "PUMP A",
        "icon": "fa-tasks",
        "order": 2,
        "disabled": false,
        "hidden": false
    }
]
1 Like