Have flow continue for a specific time then reset on a Remote

Apologize on the topic name, couldn't think of anything better.

I'm using Node Red with ZHA Events from HA, and I'm using that on my Hue dimmer switch.

What I'm trying to accomplish is lets say I have two lights. On (button) x1 = Light 1 on; On x2 = Light 2 on; On x3 = All Lights on/Both lights on. Is there a way to achieve that if I turn on Light 1 from pressing "On" once, and within a time-window (lets say 7 seconds) I can change the dim/brightness of Light 1 within that time-window? from the other buttons (the dimmer buttons)? And when timer exceeds the limit, it resets and I can do some other command such as On x2, etc.

How could I achieve this?

Some things to consider:

You don't say whether these are physical buttons or on a dashboard of some kind.

Let's say click once, light 1 comes on.
Click again, light 2 comes on.
Does light 1 go off again?
Click a third time, light 1 comes back on.

To avoid light 1 flashing on/off/on you need to count the number of button presses in a certain time, say 2 sec, and only turn the required lights on after this time.
Is this delay between clicking the button and a light coming on acceptable?
I suspect I would click the button, nothing immediately happens. Click it again. And again ..

I guess it's possible for the dimmer buttons to be active in the 2 to 7 second period. I'd probably use a simple-gate node for this, with open and close control from a trigger.

What happens if the button is clicked again during this diiming available period?

How do you turn the lights off ?

Hmm, I guess I'll try to explain a little bit better (if I even can ha).

All of this is on a Hue Dimmer Switch, so physical buttons. On the older versions, which only have four buttons: Power, dim up, dim down, off button.

I would guess that when turning on the lights when each light is attached to click once, click twice, click three times, all of those would be in a 2 sec time-frame, then it activates, the specific light turns on, then right after I would like a 7 second window where if I press the dim up/down it would dim that light that just got turned on. After those 7 sec, the dim buttons would default to whatever they are assigned (normally).

Power button would be the same (but no 7 sec window for some other input), 1 press, light off; 2 press, other light off; 3 press, all lights off.

I'm just wondering what specific kind of node would help me achieve this. A switch node with some kind of timer attached? Then reset... or really only a function with specific code would achieve this? Just trying to find the path that could possibly achieve this. I understand this seems to be more of a complicated and/or advanced kind of flow, but would be neat to achieve it.

I don't have Hue lights nor Home Assistant so I simulated your setup with injects instead of button presses and debugs instead of commands to switch or change brightness.
It might give you some ideas.

[{"id":"244ee3ba9dc67029","type":"tab","label":"Flow 2","disabled":false,"info":"","env":[]},{"id":"69507da39c3b049e","type":"group","z":"244ee3ba9dc67029","name":"Count button presses in 2 sec","style":{"label":true,"stroke":"#9363b7","color":"#6f2fa0"},"nodes":["9e0a85c169a1da4b","adac5539ad3c1b81","d91e096d207f33ff","3d7aaa0692fd2e0b","e20606e12d1e3319","7d78f40ee009c1fd","959852eca2918849"],"x":14,"y":119,"w":592,"h":127},{"id":"209fad605203568f","type":"group","z":"244ee3ba9dc67029","name":"Permit brightness adjustment","style":{"label":true,"stroke":"#9363b7","color":"#6f2fa0"},"nodes":["71837a388a9ca1b1","4c6f66ea83dc0f4b","c6de7c90a2a2f6eb","547e21db33bdbc9e","d731a4facc362c4c","54fac6be545f46ae","ceb95df3fb0d42f5"],"x":14,"y":259,"w":592,"h":182},{"id":"7d78f40ee009c1fd","type":"junction","z":"244ee3ba9dc67029","g":"69507da39c3b049e","x":200,"y":180,"wires":[["adac5539ad3c1b81","3d7aaa0692fd2e0b"]]},{"id":"959852eca2918849","type":"junction","z":"244ee3ba9dc67029","g":"69507da39c3b049e","x":580,"y":220,"wires":[["82254b08b7839fe4","d731a4facc362c4c"]]},{"id":"ceb95df3fb0d42f5","type":"junction","z":"244ee3ba9dc67029","g":"209fad605203568f","x":580,"y":400,"wires":[["50b6e55b129e1c0c"]]},{"id":"9e0a85c169a1da4b","type":"ui_button","z":"244ee3ba9dc67029","g":"69507da39c3b049e","name":"","group":"3ce32370.c60f1c","order":8,"width":0,"height":0,"passthru":false,"label":"button","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"press","payloadType":"str","topic":"topic","topicType":"msg","x":130,"y":200,"wires":[["7d78f40ee009c1fd"]]},{"id":"adac5539ad3c1b81","type":"function","z":"244ee3ba9dc67029","g":"69507da39c3b049e","name":"function 25","func":"let presses = context.get(\"presses\") ?? 0\nif (msg.payload == 0) presses = 0\nelse presses += 1;\ncontext.set(\"presses\", presses)\nmsg.payload = presses;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":330,"y":160,"wires":[["e20606e12d1e3319"]]},{"id":"d91e096d207f33ff","type":"inject","z":"244ee3ba9dc67029","g":"69507da39c3b049e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":120,"y":160,"wires":[["7d78f40ee009c1fd"]]},{"id":"3d7aaa0692fd2e0b","type":"trigger","z":"244ee3ba9dc67029","g":"69507da39c3b049e","name":"2s inactive","op1":"","op2":"0","op1type":"nul","op2type":"num","duration":"2020","extend":true,"overrideDelay":false,"units":"ms","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":330,"y":200,"wires":[["adac5539ad3c1b81"]]},{"id":"82254b08b7839fe4","type":"switch","z":"244ee3ba9dc67029","name":"Count","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"num"},{"t":"eq","v":"2","vt":"num"},{"t":"eq","v":"3","vt":"num"},{"t":"eq","v":"4","vt":"num"},{"t":"else"}],"checkall":"true","repair":false,"outputs":5,"x":710,"y":220,"wires":[["bd928e20bd841c5d"],["b4fbe741969e6ab7"],["e5b0b30187b5e9ef"],["621224aede8ee33d"],["882acf1424f2aa2c"]]},{"id":"e20606e12d1e3319","type":"trigger","z":"244ee3ba9dc67029","g":"69507da39c3b049e","name":"","op1":"","op2":"","op1type":"nul","op2type":"payl","duration":"2","extend":true,"overrideDelay":false,"units":"s","reset":"0","bytopic":"all","topic":"topic","outputs":1,"x":500,"y":160,"wires":[["959852eca2918849"]]},{"id":"bd928e20bd841c5d","type":"debug","z":"244ee3ba9dc67029","name":"1 ON","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":870,"y":140,"wires":[]},{"id":"b4fbe741969e6ab7","type":"debug","z":"244ee3ba9dc67029","name":"2 ON","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":870,"y":180,"wires":[]},{"id":"e5b0b30187b5e9ef","type":"debug","z":"244ee3ba9dc67029","name":"Both ON","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":880,"y":220,"wires":[]},{"id":"621224aede8ee33d","type":"debug","z":"244ee3ba9dc67029","name":"Both OFF","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":880,"y":260,"wires":[]},{"id":"c6de7c90a2a2f6eb","type":"trigger","z":"244ee3ba9dc67029","g":"209fad605203568f","name":"Open gate 5s","op1":"open","op2":"close","op1type":"str","op2type":"str","duration":"5","extend":false,"overrideDelay":false,"units":"s","reset":"0","bytopic":"all","topic":"topic","outputs":1,"x":420,"y":300,"wires":[["71837a388a9ca1b1"]]},{"id":"71837a388a9ca1b1","type":"gate","z":"244ee3ba9dc67029","g":"209fad605203568f","name":"","controlTopic":"control","defaultState":"closed","openCmd":"open","closeCmd":"close","toggleCmd":"toggle","defaultCmd":"default","statusCmd":"status","persist":false,"storeName":"memory","x":450,"y":360,"wires":[["ceb95df3fb0d42f5"]]},{"id":"547e21db33bdbc9e","type":"change","z":"244ee3ba9dc67029","g":"209fad605203568f","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"control","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":250,"y":300,"wires":[["c6de7c90a2a2f6eb"]]},{"id":"4c6f66ea83dc0f4b","type":"inject","z":"244ee3ba9dc67029","g":"209fad605203568f","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"1","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":130,"y":360,"wires":[["71837a388a9ca1b1"]]},{"id":"50b6e55b129e1c0c","type":"debug","z":"244ee3ba9dc67029","name":"Change brightness","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":890,"y":400,"wires":[]},{"id":"d731a4facc362c4c","type":"switch","z":"244ee3ba9dc67029","g":"209fad605203568f","name":"","property":"payload","propertyType":"msg","rules":[{"t":"lt","v":"4","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":110,"y":300,"wires":[["547e21db33bdbc9e"]]},{"id":"3f28aac4b5d6f59f","type":"comment","z":"244ee3ba9dc67029","name":"4: Both off, no brightness adjustment (!)","info":"","x":510,"y":80,"wires":[]},{"id":"ce420271b5c935d6","type":"comment","z":"244ee3ba9dc67029","name":">4: Do nothing","info":"","x":760,"y":40,"wires":[]},{"id":"753062234b4a4e0e","type":"comment","z":"244ee3ba9dc67029","name":"3: Both on, allow brightness adjustment","info":"","x":510,"y":40,"wires":[]},{"id":"75261df02a33deed","type":"comment","z":"244ee3ba9dc67029","name":"2: Light 2 on, allow brightness adjustment","info":"","x":180,"y":80,"wires":[]},{"id":"f00e5ab0321773af","type":"comment","z":"244ee3ba9dc67029","name":"1: Light 1 on, allow brightness adjustment","info":"","x":180,"y":40,"wires":[]},{"id":"882acf1424f2aa2c","type":"debug","z":"244ee3ba9dc67029","name":"Too many clicks","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":900,"y":300,"wires":[]},{"id":"54fac6be545f46ae","type":"link in","z":"244ee3ba9dc67029","g":"209fad605203568f","name":"Brightness setting","links":[],"x":130,"y":400,"wires":[["71837a388a9ca1b1"]],"l":true},{"id":"3ce32370.c60f1c","type":"ui_group","name":"Espresso","tab":"d74bbed4.c2cfb","order":1,"disp":true,"width":"3","collapse":false,"className":""},{"id":"d74bbed4.c2cfb","type":"ui_tab","name":"Kitchen","icon":"dashboard","order":1,"disabled":false,"hidden":false}]

Hey there, I got to say this is exactly what I was looking for. From modding it to my set up, it works like your example @jbudd

But I'm running into an issue. Obviously since you do not use HA so your entities will be different and such, what I'm running into is when changing the brightness, at least for HA, you specify which device/light does the decrease/increase in brightness. As you can see in my example.

[
    {
        "id": "63ba6a4df5568f01",
        "type": "tab",
        "label": "Flow 2",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "51043c1ac96c44d1",
        "type": "group",
        "z": "63ba6a4df5568f01",
        "name": "Count button presses in 2 sec",
        "style": {
            "label": true,
            "stroke": "#9363b7",
            "color": "#6f2fa0"
        },
        "nodes": [
            "4f545b94277372e7",
            "27528e7a60af2132",
            "d2d72bc55eb14d77",
            "b896612f7cd0c917",
            "7302b8f94fd1fdfc",
            "a89439b3384aa532"
        ],
        "x": 694,
        "y": 519,
        "w": 592,
        "h": 127
    },
    {
        "id": "3410baab28559ffb",
        "type": "group",
        "z": "63ba6a4df5568f01",
        "name": "Permit brightness adjustment",
        "style": {
            "label": true,
            "stroke": "#9363b7",
            "color": "#6f2fa0"
        },
        "nodes": [
            "450bdb5c804906fe",
            "7bfd1a3532b79f94",
            "f50cb70a17346bb3",
            "3db53157a8908ab5",
            "cb97bbfa8d8b56bf",
            "24fb1f14ade01fc4",
            "4b2091f778c94742"
        ],
        "x": 694,
        "y": 699,
        "w": 592,
        "h": 182
    },
    {
        "id": "7302b8f94fd1fdfc",
        "type": "junction",
        "z": "63ba6a4df5568f01",
        "g": "51043c1ac96c44d1",
        "x": 880,
        "y": 580,
        "wires": [
            [
                "4f545b94277372e7",
                "d2d72bc55eb14d77"
            ]
        ]
    },
    {
        "id": "a89439b3384aa532",
        "type": "junction",
        "z": "63ba6a4df5568f01",
        "g": "51043c1ac96c44d1",
        "x": 1260,
        "y": 620,
        "wires": [
            [
                "059657765a78db69",
                "cb97bbfa8d8b56bf"
            ]
        ]
    },
    {
        "id": "4b2091f778c94742",
        "type": "junction",
        "z": "63ba6a4df5568f01",
        "g": "3410baab28559ffb",
        "x": 1260,
        "y": 840,
        "wires": [
            [
                "bb36f7f08e1120d2",
                "18f128597870a1d9"
            ]
        ]
    },
    {
        "id": "059657765a78db69",
        "type": "switch",
        "z": "63ba6a4df5568f01",
        "name": "Count",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "1",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "2",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "3",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "4",
                "vt": "num"
            },
            {
                "t": "else"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 5,
        "x": 1390,
        "y": 660,
        "wires": [
            [
                "4702059087158b2a",
                "6ed299bd99612f4f"
            ],
            [
                "324c32712ca61150",
                "56351f7af1101856"
            ],
            [
                "3af494a76541f05d"
            ],
            [
                "fef6244d93fc1089"
            ],
            [
                "1be84399cba41f23"
            ]
        ]
    },
    {
        "id": "4702059087158b2a",
        "type": "debug",
        "z": "63ba6a4df5568f01",
        "name": "1 ON",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1570,
        "y": 420,
        "wires": []
    },
    {
        "id": "324c32712ca61150",
        "type": "debug",
        "z": "63ba6a4df5568f01",
        "name": "2 ON",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1570,
        "y": 580,
        "wires": []
    },
    {
        "id": "3af494a76541f05d",
        "type": "debug",
        "z": "63ba6a4df5568f01",
        "name": "Both ON",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1560,
        "y": 660,
        "wires": []
    },
    {
        "id": "fef6244d93fc1089",
        "type": "debug",
        "z": "63ba6a4df5568f01",
        "name": "Both OFF",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1560,
        "y": 700,
        "wires": []
    },
    {
        "id": "bb36f7f08e1120d2",
        "type": "debug",
        "z": "63ba6a4df5568f01",
        "name": "Change brightness2",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1580,
        "y": 940,
        "wires": []
    },
    {
        "id": "1be84399cba41f23",
        "type": "debug",
        "z": "63ba6a4df5568f01",
        "name": "Too many clicks",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1580,
        "y": 740,
        "wires": []
    },
    {
        "id": "4f545b94277372e7",
        "type": "function",
        "z": "63ba6a4df5568f01",
        "g": "51043c1ac96c44d1",
        "name": "function 26",
        "func": "let presses = context.get(\"presses\") ?? 0\nif (msg.payload == 0) presses = 0\nelse presses += 1;\ncontext.set(\"presses\", presses)\nmsg.payload = presses;\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1010,
        "y": 560,
        "wires": [
            [
                "b896612f7cd0c917"
            ]
        ]
    },
    {
        "id": "27528e7a60af2132",
        "type": "inject",
        "z": "63ba6a4df5568f01",
        "g": "51043c1ac96c44d1",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 800,
        "y": 560,
        "wires": [
            [
                "7302b8f94fd1fdfc"
            ]
        ]
    },
    {
        "id": "d2d72bc55eb14d77",
        "type": "trigger",
        "z": "63ba6a4df5568f01",
        "g": "51043c1ac96c44d1",
        "name": "2s inactive",
        "op1": "",
        "op2": "0",
        "op1type": "nul",
        "op2type": "num",
        "duration": "2020",
        "extend": true,
        "overrideDelay": false,
        "units": "ms",
        "reset": "",
        "bytopic": "all",
        "topic": "topic",
        "outputs": 1,
        "x": 1010,
        "y": 600,
        "wires": [
            [
                "4f545b94277372e7"
            ]
        ]
    },
    {
        "id": "b896612f7cd0c917",
        "type": "trigger",
        "z": "63ba6a4df5568f01",
        "g": "51043c1ac96c44d1",
        "name": "",
        "op1": "",
        "op2": "",
        "op1type": "nul",
        "op2type": "payl",
        "duration": "2",
        "extend": true,
        "overrideDelay": false,
        "units": "s",
        "reset": "0",
        "bytopic": "all",
        "topic": "topic",
        "outputs": 1,
        "x": 1180,
        "y": 560,
        "wires": [
            [
                "a89439b3384aa532"
            ]
        ]
    },
    {
        "id": "450bdb5c804906fe",
        "type": "gate",
        "z": "63ba6a4df5568f01",
        "g": "3410baab28559ffb",
        "name": "",
        "controlTopic": "control",
        "defaultState": "closed",
        "openCmd": "open",
        "closeCmd": "close",
        "toggleCmd": "toggle",
        "defaultCmd": "default",
        "statusCmd": "status",
        "persist": false,
        "storeName": "memory",
        "x": 1130,
        "y": 800,
        "wires": [
            [
                "4b2091f778c94742"
            ]
        ]
    },
    {
        "id": "7bfd1a3532b79f94",
        "type": "inject",
        "z": "63ba6a4df5568f01",
        "g": "3410baab28559ffb",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "1",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 810,
        "y": 800,
        "wires": [
            [
                "450bdb5c804906fe"
            ]
        ]
    },
    {
        "id": "f50cb70a17346bb3",
        "type": "trigger",
        "z": "63ba6a4df5568f01",
        "g": "3410baab28559ffb",
        "name": "Open gate 7s",
        "op1": "open",
        "op2": "close",
        "op1type": "str",
        "op2type": "str",
        "duration": "7",
        "extend": false,
        "overrideDelay": false,
        "units": "s",
        "reset": "0",
        "bytopic": "all",
        "topic": "topic",
        "outputs": 1,
        "x": 1100,
        "y": 740,
        "wires": [
            [
                "450bdb5c804906fe"
            ]
        ]
    },
    {
        "id": "3db53157a8908ab5",
        "type": "change",
        "z": "63ba6a4df5568f01",
        "g": "3410baab28559ffb",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "topic",
                "pt": "msg",
                "to": "control",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 930,
        "y": 740,
        "wires": [
            [
                "f50cb70a17346bb3"
            ]
        ]
    },
    {
        "id": "cb97bbfa8d8b56bf",
        "type": "switch",
        "z": "63ba6a4df5568f01",
        "g": "3410baab28559ffb",
        "name": "",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "lt",
                "v": "4",
                "vt": "num"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 790,
        "y": 740,
        "wires": [
            [
                "3db53157a8908ab5"
            ]
        ]
    },
    {
        "id": "24fb1f14ade01fc4",
        "type": "link in",
        "z": "63ba6a4df5568f01",
        "g": "3410baab28559ffb",
        "name": "Brightness setting",
        "links": [],
        "x": 810,
        "y": 840,
        "wires": [
            [
                "450bdb5c804906fe"
            ]
        ],
        "l": true
    },
    {
        "id": "0730b2603f9432e7",
        "type": "server-events",
        "z": "63ba6a4df5568f01",
        "name": "ZHA Event",
        "server": "8de944d3d3458290",
        "version": 2,
        "eventType": "zha_event",
        "exposeToHomeAssistant": false,
        "eventData": "",
        "haConfig": [
            {
                "property": "name",
                "value": ""
            },
            {
                "property": "icon",
                "value": ""
            }
        ],
        "waitForRunning": true,
        "outputProperties": [
            {
                "property": "payload",
                "propertyType": "msg",
                "value": "",
                "valueType": "eventData"
            },
            {
                "property": "topic",
                "propertyType": "msg",
                "value": "$outputData(\"eventData\").event_type",
                "valueType": "jsonata"
            },
            {
                "property": "event_type",
                "propertyType": "msg",
                "value": "$outputData(\"eventData\").event_type",
                "valueType": "jsonata"
            }
        ],
        "x": 300,
        "y": 800,
        "wires": [
            [
                "069a909076c32c8b"
            ]
        ]
    },
    {
        "id": "069a909076c32c8b",
        "type": "switch",
        "z": "63ba6a4df5568f01",
        "name": "On/Off/Step",
        "property": "payload.event.command",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "on",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "off_with_effect",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "step",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "up_double_press",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 4,
        "x": 490,
        "y": 740,
        "wires": [
            [
                "7302b8f94fd1fdfc"
            ],
            [],
            [
                "450bdb5c804906fe"
            ],
            []
        ]
    },
    {
        "id": "6ed299bd99612f4f",
        "type": "api-call-service",
        "z": "63ba6a4df5568f01",
        "name": "Bedroom Light 1",
        "server": "8de944d3d3458290",
        "version": 5,
        "debugenabled": false,
        "domain": "light",
        "service": "turn_on",
        "areaId": [],
        "deviceId": [],
        "entityId": [],
        "data": "{\"brightness\": 255}",
        "dataType": "jsonata",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "output_location": "",
        "output_location_type": "none",
        "x": 1600,
        "y": 460,
        "wires": [
            []
        ]
    },
    {
        "id": "64600c3c90b7a5c0",
        "type": "api-call-service",
        "z": "63ba6a4df5568f01",
        "name": "Increase 20%",
        "server": "8de944d3d3458290",
        "version": 5,
        "debugenabled": false,
        "domain": "light",
        "service": "turn_on",
        "areaId": [],
        "deviceId": [],
        "entityId": [],
        "data": "{\"brightness_step_pct\": 20}",
        "dataType": "jsonata",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "output_location": "",
        "output_location_type": "none",
        "x": 1800,
        "y": 780,
        "wires": [
            []
        ]
    },
    {
        "id": "5a167cd5ed48026d",
        "type": "api-call-service",
        "z": "63ba6a4df5568f01",
        "name": "Decrease 20%",
        "server": "8de944d3d3458290",
        "version": 5,
        "debugenabled": false,
        "domain": "light",
        "service": "turn_on",
        "areaId": [],
        "deviceId": [],
        "entityId": [],
        "data": "{\"brightness_step_pct\": -20}",
        "dataType": "jsonata",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "output_location": "",
        "output_location_type": "none",
        "x": 1800,
        "y": 840,
        "wires": [
            []
        ]
    },
    {
        "id": "18f128597870a1d9",
        "type": "switch",
        "z": "63ba6a4df5568f01",
        "name": "Type of Step",
        "property": "payload.event",
        "propertyType": "msg",
        "rules": [
            {
                "t": "jsonata_exp",
                "v": "msg.payload.event.args=[0,30,9]",
                "vt": "jsonata"
            },
            {
                "t": "jsonata_exp",
                "v": "msg.payload.event.args=[0,56,9]",
                "vt": "jsonata"
            },
            {
                "t": "jsonata_exp",
                "v": "msg.payload.event.args=[1,30,9]",
                "vt": "jsonata"
            },
            {
                "t": "jsonata_exp",
                "v": "msg.payload.event.args=[1,56,9]",
                "vt": "jsonata"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 4,
        "x": 1550,
        "y": 840,
        "wires": [
            [
                "64600c3c90b7a5c0",
                "73048a2dec7d28ad"
            ],
            [],
            [
                "5a167cd5ed48026d",
                "9dcfe57bb11c3c46"
            ],
            []
        ]
    },
    {
        "id": "56351f7af1101856",
        "type": "api-call-service",
        "z": "63ba6a4df5568f01",
        "name": "Bedroom Light 2",
        "server": "8de944d3d3458290",
        "version": 5,
        "debugenabled": false,
        "domain": "light",
        "service": "turn_on",
        "areaId": [],
        "deviceId": [],
        "entityId": [],
        "data": "{\"brightness\": 255}",
        "dataType": "jsonata",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "output_location": "",
        "output_location_type": "none",
        "x": 1600,
        "y": 540,
        "wires": [
            []
        ]
    },
    {
        "id": "73048a2dec7d28ad",
        "type": "debug",
        "z": "63ba6a4df5568f01",
        "name": "debug 9",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 2000,
        "y": 820,
        "wires": []
    },
    {
        "id": "9dcfe57bb11c3c46",
        "type": "debug",
        "z": "63ba6a4df5568f01",
        "name": "debug 10",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 2000,
        "y": 900,
        "wires": []
    },
    {
        "id": "8de944d3d3458290",
        "type": "server",
        "name": "Home Assistant",
        "version": 5,
        "addon": false,
        "rejectUnauthorizedCerts": false,
        "ha_boolean": "y|yes|true|on|home|open",
        "connectionDelay": true,
        "cacheJson": true,
        "heartbeat": false,
        "heartbeatInterval": "30",
        "areaSelector": "friendlyName",
        "deviceSelector": "friendlyName",
        "entitySelector": "friendlyName",
        "statusSeparator": "at: ",
        "statusYear": "hidden",
        "statusMonth": "short",
        "statusDay": "numeric",
        "statusHourCycle": "h23",
        "statusTimeFormat": "h:m",
        "enableGlobalContextStore": true
    }
]

Is there a different way to change brightness other than using the HA nodes to do it? Because by using the HA nodes for brightness, it seems you cannot specify which specific device you want to change brightness on, based off of the flow. Meaning, I only want to change brightness on light 2 when I run the flow, but the way the nodes work on 'HA-Call service node' you have to specify a device to change the brightness. So it causes having more than one light, it'll run all of the service nodes you have...vs the exact specific device you are running from the entire flow. Hope that made a little sense, could not explain any better. :confused:

The only thing I could think of was injecting other data into the bedroom light 1 node to change brightness like {"brightness_step_pct": 20}, so you put a line from "incrase 20%" to the bedroom light 1. But not sure how to do that. And obviously I feel like there is a better way of doing that?

If it helps, this is the debug of where I got the perimeters for Hue remote:

{"event_type":"zha_event","event":{"device_ieee":"00:17:88:01:08:6e:70:db","unique_id":"00:17:88:01:08:6e:70:db:1:0x0008","device_id":"939e69de25c6cb73d860628019b5da86","endpoint_id":1,"cluster_id":8,"command":"step","args":[1,30,9],"params":{"step_mode":1,"step_size":30,"transition_time":9,"options_mask":null,"options_override":null}},"origin":"LOCAL","time_fired":"2022-12-17T16:18:56.026527+00:00","context":{"id":"01GMGE38CT595DWECKQG85E3SD","parent_id":null,"user_id":null}}

For completeness, I wonder if you have seen this node by Bart...

It can detect all kinds of button clicks / events.

You might be able to use it to detect different types of button press and use them to do different things?

(oops, off-topic rant deleted :smiley:)

I'll definitely look into this, and see if I can achieve some of the chaos I'm trying to get for my setup haha.

Is there a node that can do this at all?

3 inputs

light 1 > 1
light 2 > 2
remote commands > 3

And whatever light I activate, the port 1 opens/activates, opens port 1 on the output-side, and data from the remote (input 3) commands go into that port (port 1 output), and then using the gates from @jbudd example it would keep those ports open the way they are for X-amount of time, so you can do the brightness. Then close. Then repeat for a different light.

I ask this, because at least with my set-up with HA using Zigbee HA (ZHA events), the remote commands are all the same (as they should be), so filter that way, and the above node (if it even exists), and then the inputs can go to the specific light within that 7 sec time-frame.

Is there a node to do this? Or even, is there a better way of doing this?

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