Display a time from Integers

Hello,
I am trying to use a dashboard text node to display I time that I have. I receive the time from a PLC out node which return two integers. One for hours and one for minutes. How do I take both of these integers and input them into a text node to show them as a time? I realize that it is supposed to look something like what I have included in my flow but cannot figure out how to make the function work correctly. I included the inject nodes to test instead of using the s7 for simplicity.

[
    {
        "id": "33219e0eb563e7bc",
        "type": "tab",
        "label": "Flow 1",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "c51046471ad7f094",
        "type": "s7 in",
        "z": "33219e0eb563e7bc",
        "d": true,
        "endpoint": "536e689b9bb806e1",
        "mode": "single",
        "variable": "BR1 OUT START_BREAK_HOUR",
        "diff": true,
        "name": "Current BR 1 Hour",
        "x": 90,
        "y": 180,
        "wires": [
            []
        ]
    },
    {
        "id": "0b3987e032d76256",
        "type": "s7 in",
        "z": "33219e0eb563e7bc",
        "d": true,
        "endpoint": "536e689b9bb806e1",
        "mode": "single",
        "variable": "BR1 OUT START_BREAK_MINUTE",
        "diff": true,
        "name": "Current BR 1 Min",
        "x": 100,
        "y": 260,
        "wires": [
            []
        ]
    },
    {
        "id": "bc83a2567b382dfe",
        "type": "ui_text",
        "z": "33219e0eb563e7bc",
        "group": "c6423dbd58df3878",
        "order": 8,
        "width": 1,
        "height": 1,
        "name": "",
        "label": "1.",
        "format": "",
        "layout": "row-center",
        "className": "",
        "x": 650,
        "y": 360,
        "wires": []
    },
    {
        "id": "b18e188be0fb2750",
        "type": "function",
        "z": "33219e0eb563e7bc",
        "name": "",
        "func": "var topic = msg.topic;\nif (topic == \"hour\"){\n    let hour = msg.payload;\n}\nif (topic == \"minute\"){\n    let minute = msg.payload;\n}\nmsg.payload = hour + \":\" + minute;\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 500,
        "y": 360,
        "wires": [
            [
                "bc83a2567b382dfe"
            ]
        ]
    },
    {
        "id": "9f11923381bf2368",
        "type": "change",
        "z": "33219e0eb563e7bc",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "topic",
                "pt": "msg",
                "to": "hour",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 330,
        "y": 320,
        "wires": [
            [
                "b18e188be0fb2750"
            ]
        ]
    },
    {
        "id": "403c4c38968fb00c",
        "type": "change",
        "z": "33219e0eb563e7bc",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "topic",
                "pt": "msg",
                "to": "minute",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 330,
        "y": 400,
        "wires": [
            [
                "b18e188be0fb2750"
            ]
        ]
    },
    {
        "id": "0439e1ac1bbe23e4",
        "type": "inject",
        "z": "33219e0eb563e7bc",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "1",
        "payloadType": "num",
        "x": 170,
        "y": 320,
        "wires": [
            [
                "9f11923381bf2368"
            ]
        ]
    },
    {
        "id": "afb5c41177032345",
        "type": "inject",
        "z": "33219e0eb563e7bc",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "23",
        "payloadType": "num",
        "x": 170,
        "y": 400,
        "wires": [
            [
                "403c4c38968fb00c"
            ]
        ]
    },
    {
        "id": "536e689b9bb806e1",
        "type": "s7 endpoint",
        "transport": "iso-on-tcp",
        "address": "10.105.21.2",
        "port": "102",
        "rack": "0",
        "slot": "1",
        "localtsaphi": "01",
        "localtsaplo": "00",
        "remotetsaphi": "01",
        "remotetsaplo": "00",
        "connmode": "rack-slot",
        "adapter": "",
        "busaddr": "2",
        "cycletime": "1000",
        "timeout": "2000",
        "name": "S105",
        "vartable": [
            {
                "addr": "DB199,DINT8728",
                "name": "STATUS"
            },
            {
                "addr": "DB199,S13536.56",
                "name": "ALARM TEXT"
            },
            {
                "addr": "DB199,INT13274",
                "name": "CURRENT SHIFT"
            },
            {
                "addr": "DB199,REAL13078",
                "name": "SH1 OEE"
            },
            {
                "addr": "DB199,REAL13154",
                "name": "SH2 OEE"
            },
            {
                "addr": "DB199,REAL13230",
                "name": "SH3 OEE"
            },
            {
                "addr": "DB199,REAL13066",
                "name": "SH1 AVAIL"
            },
            {
                "addr": "DB199,REAL13142",
                "name": "SH2 AVAIL"
            },
            {
                "addr": "DB199,REAL13218",
                "name": "SH3 AVAIL"
            },
            {
                "addr": "DB199,REAL13070",
                "name": "SH1 PERF"
            },
            {
                "addr": "DB199,REAL13146",
                "name": "SH2 PERF"
            },
            {
                "addr": "DB199,REAL13222",
                "name": "SH3 PERF"
            },
            {
                "addr": "DB199,DINT8732",
                "name": "PROD COUNTER"
            },
            {
                "addr": "DB199,INT13054",
                "name": "SH1 DAY COUNT"
            },
            {
                "addr": "DB199,INT13130",
                "name": "SH2 DAY COUNT"
            },
            {
                "addr": "DB199,INT13206",
                "name": "SH3 DAY COUNT"
            },
            {
                "addr": "DB199,DINT12078",
                "name": "ST1 CYCLE TIME"
            },
            {
                "addr": "DB199,DINT12174",
                "name": "ST2 CYCLE TIME"
            },
            {
                "addr": "DB199,DINT12270",
                "name": "ST3 CYCLE TIME"
            },
            {
                "addr": "DB199,S13792.254",
                "name": "CONC TEXT PBI"
            },
            {
                "addr": "DB199,DINT13102",
                "name": "SH1 PARTS TARGET"
            },
            {
                "addr": "DB199,DINT13178",
                "name": "SH2 PARTS TARGET"
            },
            {
                "addr": "DB199,DINT13254",
                "name": "SH3 PARTS TARGET"
            },
            {
                "addr": "DB199,INT14304",
                "name": "SH1 IN START HOUR"
            },
            {
                "addr": "DB199,INT14306",
                "name": "SH1 IN START MINUTES"
            },
            {
                "addr": "DB199,INT14308",
                "name": "SH1 IN END HOUR"
            },
            {
                "addr": "DB199,INT14310",
                "name": "SH1 IN END MINUTES"
            },
            {
                "addr": "DB199,X14312.0",
                "name": "SH1 IN RESET COUNTER"
            },
            {
                "addr": "DB199,INT14314",
                "name": "SH2 IN START HOUR"
            },
            {
                "addr": "DB199,INT14316",
                "name": "SH2 IN START MINUTES"
            },
            {
                "addr": "DB199,INT14318",
                "name": "SH2 IN END HOUR"
            },
            {
                "addr": "DB199,INT14320",
                "name": "SH2 IN END MINUTES"
            },
            {
                "addr": "DB199,X14322.0",
                "name": "SH2 IN RESET COUNTER"
            },
            {
                "addr": "DB199,INT14324",
                "name": "SH3 IN START HOUR"
            },
            {
                "addr": "DB199,INT14326",
                "name": "SH3 IN START MINUTES"
            },
            {
                "addr": "DB199,INT14328",
                "name": "SH3 IN END HOUR"
            },
            {
                "addr": "DB199,INT14330",
                "name": "SH3 IN END MINUTES"
            },
            {
                "addr": "DB199,X14332.0",
                "name": "SH3 IN RESET COUNTER"
            },
            {
                "addr": "DB199,INT14334",
                "name": "BR1 IN START HOUR"
            },
            {
                "addr": "DB199,INT14336",
                "name": "BR1 IN START MINUTES"
            },
            {
                "addr": "DB199,INT14338",
                "name": "BR1 IN END HOUR"
            },
            {
                "addr": "DB199,INT14340",
                "name": "BR1 IN END MINUTES"
            },
            {
                "addr": "DB199,X14342.0",
                "name": "BR1 IN RESET COUNTER"
            },
            {
                "addr": "DB199,X14342.1",
                "name": "BR1 IN ENABLE TIP SERVICE"
            },
            {
                "addr": "DB199,INT14344",
                "name": "BR2 IN START HOUR"
            },
            {
                "addr": "DB199,INT14346",
                "name": "BR2 IN START MINUTES"
            },
            {
                "addr": "DB199,INT14348",
                "name": "BR2 IN END HOUR"
            },
            {
                "addr": "DB199,INT14350",
                "name": "BR2 IN END MINUTES"
            },
            {
                "addr": "DB199,X14352.0",
                "name": "BR2 IN RESET COUNTER"
            },
            {
                "addr": "DB199,X14352.1",
                "name": "BR2 IN ENABLE TIP SERVICE"
            },
            {
                "addr": "DB199,INT14354",
                "name": "BR3 IN START HOUR"
            },
            {
                "addr": "DB199,INT14356",
                "name": "BR3 IN START MINUTES"
            },
            {
                "addr": "DB199,INT14358",
                "name": "BR3 IN END HOUR"
            },
            {
                "addr": "DB199,INT14360",
                "name": "BR3 IN END MINUTES"
            },
            {
                "addr": "DB199,X14362.0",
                "name": "BR3 IN RESET COUNTER"
            },
            {
                "addr": "DB199,X14362.1",
                "name": "BR3 IN ENABLE TIP SERVICE"
            },
            {
                "addr": "DB199,INT14364",
                "name": "BR4 IN START HOUR"
            },
            {
                "addr": "DB199,INT14366",
                "name": "BR4 IN START MINUTES"
            },
            {
                "addr": "DB199,INT14368",
                "name": "BR4 IN END HOUR"
            },
            {
                "addr": "DB199,INT14370",
                "name": "BR4 IN END MINUTES"
            },
            {
                "addr": "DB199,X14372.0",
                "name": "BR4 IN RESET COUNTER"
            },
            {
                "addr": "DB199,X14372.1",
                "name": "BR4 IN ENABLE TIP SERVICE"
            },
            {
                "addr": "DB199,INT14374",
                "name": "BR5 IN START HOUR"
            },
            {
                "addr": "DB199,INT14376",
                "name": "BR5 IN START MINUTES"
            },
            {
                "addr": "DB199,INT14378",
                "name": "BR5 IN END HOUR"
            },
            {
                "addr": "DB199,INT14380",
                "name": "BR5 IN END MINUTES"
            },
            {
                "addr": "DB199,X14382.0",
                "name": "BR5 IN RESET COUNTER"
            },
            {
                "addr": "DB199,X14382.1",
                "name": "BR5 IN ENABLE TIP SERVICE"
            },
            {
                "addr": "DB199,INT14384",
                "name": "BR6 IN START HOUR"
            },
            {
                "addr": "DB199,INT14386",
                "name": "BR6 IN START MINUTES"
            },
            {
                "addr": "DB199,INT14388",
                "name": "BR6 IN END HOUR"
            },
            {
                "addr": "DB199,INT14390",
                "name": "BR6 IN END MINUTES"
            },
            {
                "addr": "DB199,X14392.0",
                "name": "BR6 IN RESET COUNTER"
            },
            {
                "addr": "DB199,X14392.1",
                "name": "BR6 IN ENABLE TIP SERVICE"
            },
            {
                "addr": "DB199,INT14394",
                "name": "BR7 IN START HOUR"
            },
            {
                "addr": "DB199,INT14396",
                "name": "BR7 IN START MINUTES"
            },
            {
                "addr": "DB199,INT14398",
                "name": "BR7 IN END HOUR"
            },
            {
                "addr": "DB199,INT14400",
                "name": "BR7 IN END MINUTES"
            },
            {
                "addr": "DB199,X14402.0",
                "name": "BR7 IN RESET COUNTER"
            },
            {
                "addr": "DB199,X14402.1",
                "name": "BR7 IN ENABLE TIP SERVICE"
            },
            {
                "addr": "DB199,INT14404",
                "name": "BR8 IN START HOUR"
            },
            {
                "addr": "DB199,INT14406",
                "name": "BR8 IN START MINUTES"
            },
            {
                "addr": "DB199,INT14408",
                "name": "BR8 IN END HOUR"
            },
            {
                "addr": "DB199,INT14410",
                "name": "BR8 IN END MINUTES"
            },
            {
                "addr": "DB199,X14412.0",
                "name": "BR8 IN RESET COUNTER"
            },
            {
                "addr": "DB199,X14412.1",
                "name": "BR8 IN ENABLE TIP SERVICE"
            },
            {
                "addr": "DB199,INT14414",
                "name": "BR9 IN START HOUR"
            },
            {
                "addr": "DB199,INT14416",
                "name": "BR9 IN START MINUTES"
            },
            {
                "addr": "DB199,INT14418",
                "name": "BR9 IN END HOUR"
            },
            {
                "addr": "DB199,INT14420",
                "name": "BR9 IN END MINUTES"
            },
            {
                "addr": "DB199,X14422.0",
                "name": "BR9 IN RESET COUNTER"
            },
            {
                "addr": "DB199,X14422.1",
                "name": "BR9 IN ENABLE TIP SERVICE"
            },
            {
                "addr": "DB199,INT14424",
                "name": "BR10 IN START HOUR"
            },
            {
                "addr": "DB199,INT14426",
                "name": "BR10 IN START MINUTES"
            },
            {
                "addr": "DB199,INT14428",
                "name": "BR10 IN END HOUR"
            },
            {
                "addr": "DB199,INT14430",
                "name": "BR10 IN END MINUTES"
            },
            {
                "addr": "DB199,X14432.0",
                "name": "BR10 IN RESET COUNTER"
            },
            {
                "addr": "DB199,X14432.1",
                "name": "BR10 IN ENABLE TIP SERVICE"
            },
            {
                "addr": "DB199,INT14434",
                "name": "BR11 IN START HOUR"
            },
            {
                "addr": "DB199,INT14436",
                "name": "BR11 IN START MINUTES"
            },
            {
                "addr": "DB199,INT14438",
                "name": "BR11 IN END HOUR"
            },
            {
                "addr": "DB199,INT14440",
                "name": "BR11 IN END MINUTES"
            },
            {
                "addr": "DB199,X14442.0",
                "name": "BR11 IN RESET COUNTER"
            },
            {
                "addr": "DB199,X14442.1",
                "name": "BR11 IN ENABLE TIP SERVICE"
            },
            {
                "addr": "DB199,INT14444",
                "name": "BR12 IN START HOUR"
            },
            {
                "addr": "DB199,INT14446",
                "name": "BR12 IN START MINUTES"
            },
            {
                "addr": "DB199,INT14448",
                "name": "BR12 IN END HOUR"
            },
            {
                "addr": "DB199,INT14450",
                "name": "BR12 IN END MINUTES"
            },
            {
                "addr": "DB199,X14452.0",
                "name": "BR12 IN RESET COUNTER"
            },
            {
                "addr": "DB199,X14452.1",
                "name": "BR12 IN ENABLE TIP SERVICE"
            },
            {
                "addr": "DB199,X14454.0",
                "name": "BR12 IN WRITE SHIFT TIMES"
            },
            {
                "addr": "DB199,INT14456",
                "name": "SH1 OUT START_SHIFT_HOUR"
            },
            {
                "addr": "DB199,INT14458",
                "name": "SH1 OUT START_SHIFT_MINUTE"
            },
            {
                "addr": "DB199,INT14460",
                "name": "SH1 OUT END_SHIFT_HOUR"
            },
            {
                "addr": "DB199,INT14462",
                "name": "SH1 OUT END_SHIFT_MINUTE"
            },
            {
                "addr": "DB199,INT14464",
                "name": "SH2 OUT START_SHIFT_HOUR"
            },
            {
                "addr": "DB199,INT14466",
                "name": "SH2 OUT START_SHIFT_MINUTE"
            },
            {
                "addr": "DB199,INT14468",
                "name": "SH2 OUTEND_SHIFT_HOUR"
            },
            {
                "addr": "DB199,INT14470",
                "name": "SH2 OUTEND_SHIFT_MINUTE"
            },
            {
                "addr": "DB199,INT14472",
                "name": "SH3 OUT START_SHIFT_HOUR"
            },
            {
                "addr": "DB199,INT14474",
                "name": "SH3 OUT START_SHIFT_MINUTE"
            },
            {
                "addr": "DB199,INT14476",
                "name": "SH3 OUT END_SHIFT_HOUR"
            },
            {
                "addr": "DB199,INT14478",
                "name": "SH3 OUT END_SHIFT_MINUTE"
            },
            {
                "addr": "DB199,INT14480",
                "name": "BR1 OUT START_BREAK_HOUR"
            },
            {
                "addr": "DB199,INT14482",
                "name": "BR1 OUT START_BREAK_MINUTE"
            },
            {
                "addr": "DB199,INT14484",
                "name": "BR1 OUT END_BREAK_HOUR"
            },
            {
                "addr": "DB199,INT14486",
                "name": "BR1 OUT END_BREAK_MINUTE"
            },
            {
                "addr": "DB199,X14488.0",
                "name": "BR1 OUT BREAK_ACTIVE"
            },
            {
                "addr": "DB199,INT14490",
                "name": "BR2 OUT START_BREAK_HOUR"
            },
            {
                "addr": "DB199,INT14492",
                "name": "BR2 OUT START_BREAK_MINUTE"
            },
            {
                "addr": "DB199,INT14494",
                "name": "BR2 OUT END_BREAK_HOUR"
            },
            {
                "addr": "DB199,INT14496",
                "name": "BR2 OUT END_BREAK_MINUTE"
            },
            {
                "addr": "DB199,X14498.0",
                "name": "BR2 OUT BREAK_ACTIVE"
            },
            {
                "addr": "DB199,INT14500",
                "name": "BR3 OUT START_BREAK_HOUR"
            },
            {
                "addr": "DB199,INT14502",
                "name": "BR3 OUT START_BREAK_MINUTE"
            },
            {
                "addr": "DB199,INT14504",
                "name": "BR3 OUT END_BREAK_HOUR"
            },
            {
                "addr": "DB199,INT14506",
                "name": "BR3 OUT END_BREAK_MINUTE"
            },
            {
                "addr": "DB199,X14508.0",
                "name": "BR3 OUT BREAK_ACTIVE"
            },
            {
                "addr": "DB199,INT14510",
                "name": "BR4 OUT START_BREAK_HOUR"
            },
            {
                "addr": "DB199,INT14512",
                "name": "BR4 OUT START_BREAK_MINUTE"
            },
            {
                "addr": "DB199,INT14514",
                "name": "BR4 OUT END_BREAK_HOUR"
            },
            {
                "addr": "DB199,INT14516",
                "name": "BR4 OUT END_BREAK_MINUTE"
            },
            {
                "addr": "DB199,X14518.0",
                "name": "BR4 OUT BREAK_ACTIVE"
            },
            {
                "addr": "DB199,INT14520",
                "name": "BR5 OUT START_BREAK_HOUR"
            },
            {
                "addr": "DB199,INT14522",
                "name": "BR5 OUT START_BREAK_MINUTE"
            },
            {
                "addr": "DB199,INT14524",
                "name": "BR5 OUT END_BREAK_HOUR"
            },
            {
                "addr": "DB199,INT14526",
                "name": "BR5 OUT END_BREAK_MINUTE"
            },
            {
                "addr": "DB199,X14528.0",
                "name": "BR5 OUT BREAK_ACTIVE"
            },
            {
                "addr": "DB199,INT14530",
                "name": "BR6 OUT START_BREAK_HOUR"
            },
            {
                "addr": "DB199,INT14532",
                "name": "BR6 OUT START_BREAK_MINUTE"
            },
            {
                "addr": "DB199,INT14534",
                "name": "BR6 OUT END_BREAK_HOUR"
            },
            {
                "addr": "DB199,INT14536",
                "name": "BR6 OUT END_BREAK_MINUTE"
            },
            {
                "addr": "DB199,X14538.0",
                "name": "BR6 OUT BREAK_ACTIVE"
            },
            {
                "addr": "DB199,INT14540",
                "name": "BR7 OUT START_BREAK_HOUR"
            },
            {
                "addr": "DB199,INT14542",
                "name": "BR7 OUT START_BREAK_MINUTE"
            },
            {
                "addr": "DB199,INT14544",
                "name": "BR7 OUT END_BREAK_HOUR"
            },
            {
                "addr": "DB199,INT14546",
                "name": "BR7 OUT END_BREAK_MINUTE"
            },
            {
                "addr": "DB199,X14548.0",
                "name": "BR7 OUT BREAK_ACTIVE"
            },
            {
                "addr": "DB199,INT14550",
                "name": "BR8 OUT START_BREAK_HOUR"
            },
            {
                "addr": "DB199,INT14552",
                "name": "BR8 OUT START_BREAK_MINUTE"
            },
            {
                "addr": "DB199,INT14554",
                "name": "BR8 OUT END_BREAK_HOUR"
            },
            {
                "addr": "DB199,INT14556",
                "name": "BR8 OUT END_BREAK_MINUTE"
            },
            {
                "addr": "DB199,X14558.0",
                "name": "BR8 OUT BREAK_ACTIVE"
            },
            {
                "addr": "DB199,INT14560",
                "name": "BR9 OUT START_BREAK_HOUR"
            },
            {
                "addr": "DB199,INT14562",
                "name": "BR9 OUT START_BREAK_MINUTE"
            },
            {
                "addr": "DB199,INT14564",
                "name": "BR9 OUT END_BREAK_HOUR"
            },
            {
                "addr": "DB199,INT14566",
                "name": "BR9 OUT END_BREAK_MINUTE"
            },
            {
                "addr": "DB199,X14568.0",
                "name": "BR9 OUT BREAK_ACTIVE"
            },
            {
                "addr": "DB199,INT14570",
                "name": "BR10 OUT START_BREAK_HOUR"
            },
            {
                "addr": "DB199,INT14572",
                "name": "BR10 OUT START_BREAK_MINUTE"
            },
            {
                "addr": "DB199,INT14574",
                "name": "BR10 OUT END_BREAK_HOUR"
            },
            {
                "addr": "DB199,INT14576",
                "name": "BR10 OUT END_BREAK_MINUTE"
            },
            {
                "addr": "DB199,X14578.0",
                "name": "BR10 OUT BREAK_ACTIVE"
            },
            {
                "addr": "DB199,INT14580",
                "name": "BR11 OUT START_BREAK_HOUR"
            },
            {
                "addr": "DB199,INT14582",
                "name": "BR11 OUT START_BREAK_MINUTE"
            },
            {
                "addr": "DB199,INT14584",
                "name": "BR11 OUT END_BREAK_HOUR"
            },
            {
                "addr": "DB199,INT14586",
                "name": "BR11 OUT END_BREAK_MINUTE"
            },
            {
                "addr": "DB199,X14588.0",
                "name": "BR11 OUT BREAK_ACTIVE"
            },
            {
                "addr": "DB199,INT14590",
                "name": "BR12 OUT START_BREAK_HOUR"
            },
            {
                "addr": "DB199,INT14592",
                "name": "BR12 OUT START_BREAK_MINUTE"
            },
            {
                "addr": "DB199,INT14594",
                "name": "BR12 OUT END_BREAK_HOUR"
            },
            {
                "addr": "DB199,INT14596",
                "name": "BR12 OUT END_BREAK_MINUTE"
            },
            {
                "addr": "DB199,X14598.0",
                "name": "BR12 OUT BREAK_ACTIVE"
            },
            {
                "addr": "DB199,X14600.0",
                "name": "SH1 IN SHUTOFF BUTTON"
            },
            {
                "addr": "DB199,X14600.1",
                "name": "SH1 OUT SHUTOFF BUTTON"
            },
            {
                "addr": "DB199,X14602.0",
                "name": "SH2 IN SHUTOFF BUTTON"
            },
            {
                "addr": "DB199,X14602.1",
                "name": "SH2 OUT SHUTOFF BUTTON"
            },
            {
                "addr": "DB199,X14604.0",
                "name": "SH3 IN SHUTOFF BUTTON"
            },
            {
                "addr": "DB199,X14604.1",
                "name": "SH3 OUT SHUTOFF BUTTON"
            }
        ]
    },
    {
        "id": "c6423dbd58df3878",
        "type": "ui_group",
        "name": "Default",
        "tab": "e445880f979ffa0a",
        "order": 1,
        "disp": true,
        "width": "6",
        "collapse": false,
        "className": ""
    },
    {
        "id": "e445880f979ffa0a",
        "type": "ui_tab",
        "name": "Home",
        "icon": "dashboard",
        "disabled": false,
        "hidden": false
    }
]


This is your function node:

var topic = msg.topic;
if (topic == "hour"){
    let hour = msg.payload;
}
if (topic == "minute"){
    let minute = msg.payload;
}
msg.payload = hour + ":" + minute;
return msg;

When it receives a message, the function node has no knowledge of previous messages. So if this message is "hour", your variable minute is undefined, and vice versa.

One approach to fix this is a Join node, in Manual node to combine "hour" and "minute" messages into a single message holding both values.

Another, inferior, way is using context storage to retain the previous hour or minute values.

Thank you I ended up using the join node. Appreciate the help.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.