Can someone check my su7per basic Node Red flow

My son and I have spent 3 days trying to work out how to use Node Red…we’ve come up with this (I am dying with embarrassment)

We have a 4 gang switch which feeds into z2m, we’ve taken the topic, and then the payload for each button/click and fed it into a hue magic node. As we’re 100% new to this, we’ve just added 4 scenes to the Hue app and we’re clicking each button to activate a scene.

And then I’m sure we will work on dependencies and state changes and other things but just wanted to check that our basic understanding was right. Have we missed anything obvious and helpful? Am I using the right input?

[
    {
        "id": "2f6f22a4.09237e",
        "type": "tab",
        "label": "Bedroom TV lights",
        "disabled": false,
        "info": ""
    },
    {
        "id": "c6507c60.d50a8",
        "type": "mqtt in",
        "z": "2f6f22a4.09237e",
        "name": "Four Gang Switch",
        "topic": "zigbee2mqtt/Four Gang Switch/action",
        "qos": "2",
        "datatype": "auto",
        "broker": "1f66c8f2.a2e107",
        "x": 130,
        "y": 840,
        "wires": [
            []
        ]
    },
    {
        "id": "3e15802d.bf75b",
        "type": "mqtt in",
        "z": "2f6f22a4.09237e",
        "name": "Four Gang Switch",
        "topic": "zigbee2mqtt/Four Gang Switch/action",
        "qos": "2",
        "datatype": "auto",
        "broker": "1f66c8f2.a2e107",
        "x": 130,
        "y": 920,
        "wires": [
            []
        ]
    },
    {
        "id": "71daf422.f325dc",
        "type": "debug",
        "z": "2f6f22a4.09237e",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 950,
        "y": 100,
        "wires": []
    },
    {
        "id": "e2ad58d8.af6858",
        "type": "hue-bridge-node",
        "z": "2f6f22a4.09237e",
        "name": "",
        "bridge": "d2b1d65b.cbe438",
        "autoupdates": true,
        "skipglobalevents": false,
        "x": 110,
        "y": 20,
        "wires": [
            []
        ]
    },
    {
        "id": "e07aa7a9.fd8298",
        "type": "mqtt in",
        "z": "2f6f22a4.09237e",
        "name": "Four Gang Switch",
        "topic": "zigbee2mqtt/Four Gang Switch/action",
        "qos": "2",
        "datatype": "auto",
        "broker": "1f66c8f2.a2e107",
        "x": 140,
        "y": 100,
        "wires": [
            [
                "5ec8e906.c3ea68",
                "fd2041b4.53aff",
                "1c8a6aad.c0eb65",
                "125aa904.5f3ee7",
                "29dd8bab.e4bec4",
                "c3a7ad1e.6c77b",
                "442f0255.098eec",
                "b8d5ae86.81148"
            ]
        ]
    },
    {
        "id": "5ec8e906.c3ea68",
        "type": "switch",
        "z": "2f6f22a4.09237e",
        "name": "1_single",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "1_single",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 360,
        "y": 100,
        "wires": [
            [
                "de66279d.a01dc8"
            ]
        ]
    },
    {
        "id": "fd2041b4.53aff",
        "type": "switch",
        "z": "2f6f22a4.09237e",
        "name": "1_double",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "1_double",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 360,
        "y": 160,
        "wires": [
            []
        ]
    },
    {
        "id": "de66279d.a01dc8",
        "type": "hue-scene",
        "z": "2f6f22a4.09237e",
        "name": "Reading",
        "bridge": "d2b1d65b.cbe438",
        "sceneid": "lReUfrbLztzpYF2",
        "groupid": "7",
        "skipevents": false,
        "x": 560,
        "y": 100,
        "wires": [
            [
                "71daf422.f325dc"
            ]
        ]
    },
    {
        "id": "3ad03a28.73dc06",
        "type": "hue-scene",
        "z": "2f6f22a4.09237e",
        "name": "Working",
        "bridge": "d2b1d65b.cbe438",
        "sceneid": "cQMPcChbCPYbkb3",
        "groupid": "7",
        "skipevents": false,
        "x": 560,
        "y": 220,
        "wires": [
            [
                "71daf422.f325dc"
            ]
        ]
    },
    {
        "id": "1c8a6aad.c0eb65",
        "type": "switch",
        "z": "2f6f22a4.09237e",
        "name": "2_Single",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "2_single",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 360,
        "y": 220,
        "wires": [
            [
                "3ad03a28.73dc06"
            ]
        ]
    },
    {
        "id": "125aa904.5f3ee7",
        "type": "switch",
        "z": "2f6f22a4.09237e",
        "name": "2_double",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "2_double",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 360,
        "y": 280,
        "wires": [
            []
        ]
    },
    {
        "id": "29dd8bab.e4bec4",
        "type": "switch",
        "z": "2f6f22a4.09237e",
        "name": "3_single",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "3_single",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 370,
        "y": 360,
        "wires": [
            [
                "bb5eb11b.5da92"
            ]
        ]
    },
    {
        "id": "c3a7ad1e.6c77b",
        "type": "switch",
        "z": "2f6f22a4.09237e",
        "name": "3_double",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "3_double",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 370,
        "y": 420,
        "wires": [
            []
        ]
    },
    {
        "id": "442f0255.098eec",
        "type": "switch",
        "z": "2f6f22a4.09237e",
        "name": "4_single",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "4_single",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 370,
        "y": 500,
        "wires": [
            [
                "441e5426.6e756c"
            ]
        ]
    },
    {
        "id": "b8d5ae86.81148",
        "type": "switch",
        "z": "2f6f22a4.09237e",
        "name": "4_double",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "4_double",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 370,
        "y": 580,
        "wires": [
            []
        ]
    },
    {
        "id": "bb5eb11b.5da92",
        "type": "hue-scene",
        "z": "2f6f22a4.09237e",
        "name": "Bedtime",
        "bridge": "d2b1d65b.cbe438",
        "sceneid": "1Cs5TL0S1AAFm7F",
        "groupid": "7",
        "skipevents": false,
        "x": 560,
        "y": 360,
        "wires": [
            [
                "71daf422.f325dc"
            ]
        ]
    },
    {
        "id": "441e5426.6e756c",
        "type": "hue-scene",
        "z": "2f6f22a4.09237e",
        "name": "Movie",
        "bridge": "d2b1d65b.cbe438",
        "sceneid": "seb8IMOaQMc1IIE",
        "groupid": "7",
        "skipevents": false,
        "x": 550,
        "y": 500,
        "wires": [
            [
                "71daf422.f325dc"
            ]
        ]
    },
    {
        "id": "1f66c8f2.a2e107",
        "type": "mqtt-broker",
        "name": "",
        "broker": "core-mosquitto",
        "port": "1883",
        "clientid": "",
        "usetls": false,
        "compatmode": false,
        "keepalive": "60",
        "cleansession": true,
        "birthTopic": "zigbee2mqtt/Four Gang Switch/action",
        "birthQos": "0",
        "birthPayload": "",
        "closeTopic": "",
        "closeQos": "0",
        "closePayload": "",
        "willTopic": "",
        "willQos": "0",
        "willPayload": ""
    },
    {
        "id": "d2b1d65b.cbe438",
        "type": "hue-bridge",
        "name": "Philips hue",
        "bridge": "192.168.1.26",
        "key": "0hTigc-hXgrUe-YvUJh4dSWpBmPHvi0RweTKR9By",
        "interval": "2000",
        "disableupdates": false
    }
]

You’re pretty much there! You can clean things up a little by using a single switch statement instead of a separate one for each type. Like this:

[{"id":"71daf422.f325dc","type":"debug","z":"2f6f22a4.09237e","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":770,"y":100,"wires":[]},{"id":"e07aa7a9.fd8298","type":"mqtt in","z":"2f6f22a4.09237e","name":"Four Gang Switch","topic":"zigbee2mqtt/Four Gang Switch/action","qos":"2","datatype":"auto","broker":"1f66c8f2.a2e107","x":140,"y":100,"wires":[["5ec8e906.c3ea68"]]},{"id":"5ec8e906.c3ea68","type":"switch","z":"2f6f22a4.09237e","name":"switch","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"1_single","vt":"str"},{"t":"eq","v":"1_double","vt":"str"},{"t":"eq","v":"2_single","vt":"str"},{"t":"eq","v":"2_double","vt":"str"},{"t":"eq","v":"3_single","vt":"str"},{"t":"eq","v":"3_double","vt":"str"},{"t":"eq","v":"4_single","vt":"str"},{"t":"eq","v":"4_double","vt":"str"}],"checkall":"true","repair":false,"outputs":8,"x":350,"y":100,"wires":[["de66279d.a01dc8"],[],["3ad03a28.73dc06"],[],["bb5eb11b.5da92"],[],["441e5426.6e756c"],[]]},{"id":"de66279d.a01dc8","type":"hue-scene","z":"2f6f22a4.09237e","name":"Reading","bridge":"d2b1d65b.cbe438","sceneid":"lReUfrbLztzpYF2","groupid":"7","skipevents":false,"x":520,"y":40,"wires":[["71daf422.f325dc"]]},{"id":"3ad03a28.73dc06","type":"hue-scene","z":"2f6f22a4.09237e","name":"Working","bridge":"d2b1d65b.cbe438","sceneid":"cQMPcChbCPYbkb3","groupid":"7","skipevents":false,"x":520,"y":80,"wires":[["71daf422.f325dc"]]},{"id":"bb5eb11b.5da92","type":"hue-scene","z":"2f6f22a4.09237e","name":"Bedtime","bridge":"d2b1d65b.cbe438","sceneid":"1Cs5TL0S1AAFm7F","groupid":"7","skipevents":false,"x":520,"y":120,"wires":[["71daf422.f325dc"]]},{"id":"441e5426.6e756c","type":"hue-scene","z":"2f6f22a4.09237e","name":"Movie","bridge":"d2b1d65b.cbe438","sceneid":"seb8IMOaQMc1IIE","groupid":"7","skipevents":false,"x":510,"y":160,"wires":[["71daf422.f325dc"]]},{"id":"1f66c8f2.a2e107","type":"mqtt-broker","name":"","broker":"core-mosquitto","port":"1883","clientid":"","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"zigbee2mqtt/Four Gang Switch/action","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"d2b1d65b.cbe438","type":"hue-bridge","name":"Philips hue","bridge":"192.168.1.26","key":"0hTigc-hXgrUe-YvUJh4dSWpBmPHvi0RweTKR9By","interval":"2000","disableupdates":false}]

Oh that is much cleaner! Didn’t know that…next job, automating the other rooms and combining with light sensors and motion sensors