Hi.
That node has been updated only recently. Like in the last few hours.
Here is a new flow which I was originally going to give you but for the problem with how it was.
As the node has been updated this is a nice way to do what you want.
[{"id":"4be6db179f2af0b9","type":"subflow","name":"Press count","info":"2023 01 17\n==========\nUsed to count button presses and send the number in a message.\n\nIf `msg.payload` == `reset` then `0` is sent out.\nHandy if you want to also include a *reset* ability.\n\nSet the *timeout* value in the `delay` variable.\n_This controls how long between presses before it stops counting._\n\nThen send the output message into a `switch` node to do wonderful things.\n\nThe output message is a `number`.","category":"","in":[{"x":60,"y":270,"wires":[{"id":"df8cb339f3aed3ba"}]}],"out":[{"x":870,"y":210,"wires":[{"id":"900cc4787c0480a4","port":0}]}],"env":[{"name":"delay","type":"num","value":"","ui":{"type":"input","opts":{"types":["num"]}}}],"meta":{},"color":"#D8BFD8","icon":"node-red-dashboard/ui_button.png","status":{"x":870,"y":370,"wires":[{"id":"900476fafffa3ae3","port":0}]}},{"id":"c2137fa8aec03468","type":"inject","z":"4be6db179f2af0b9","name":"Reset","repeat":"","crontab":"","once":true,"onceDelay":"0.5","topic":"","payload":"","payloadType":"date","x":350,"y":290,"wires":[["5188ca7c92884164"]]},{"id":"de02a7b5bf7954d2","type":"trigger","z":"4be6db179f2af0b9","name":"","op1":"","op2":"0","op1type":"nul","op2type":"str","duration":"0.5","extend":true,"overrideDelay":false,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":370,"y":250,"wires":[["a14dd5822f1f6015","900cc4787c0480a4"]]},{"id":"5188ca7c92884164","type":"change","z":"4be6db179f2af0b9","name":"Reset","rules":[{"t":"set","p":"reset","pt":"msg","to":"foo","tot":"str"},{"t":"delete","p":"payload","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":560,"y":250,"wires":[["d5314c210f7d9a76"]]},{"id":"d5314c210f7d9a76","type":"counter","z":"4be6db179f2af0b9","name":"","init":"0","step":"1","lower":null,"upper":null,"mode":"increment","outputs":"1","x":520,"y":330,"wires":[["6a5f10e31345b897","bb0e17c295353204"]]},{"id":"6a5f10e31345b897","type":"change","z":"4be6db179f2af0b9","name":"Flow set","rules":[{"t":"set","p":"count","pt":"flow","to":"count","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":720,"y":280,"wires":[[]]},{"id":"a457eafcdad07d0b","type":"change","z":"4be6db179f2af0b9","name":"","rules":[{"t":"set","p":"delay","pt":"msg","to":"delay","tot":"env"}],"action":"","property":"","from":"","to":"","reg":false,"x":275,"y":330,"wires":[["d5314c210f7d9a76","de02a7b5bf7954d2"]],"l":false},{"id":"a14dd5822f1f6015","type":"change","z":"4be6db179f2af0b9","name":"","rules":[{"t":"delete","p":"delay","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":475,"y":250,"wires":[["5188ca7c92884164"]],"l":false},{"id":"900cc4787c0480a4","type":"function","z":"4be6db179f2af0b9","name":"","func":"msg.payload = flow.get(\"count\");\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":520,"y":210,"wires":[[]]},{"id":"bb0e17c295353204","type":"function","z":"4be6db179f2af0b9","name":"CounterValue","func":"node.status({text: \"Counting \" + msg.count});\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":700,"y":330,"wires":[[]]},{"id":"900476fafffa3ae3","type":"status","z":"4be6db179f2af0b9","name":"","scope":["bb0e17c295353204"],"x":720,"y":370,"wires":[[]]},{"id":"df8cb339f3aed3ba","type":"switch","z":"4be6db179f2af0b9","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"reset","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":150,"y":270,"wires":[["397e91b8f88a8919"],["a457eafcdad07d0b"]]},{"id":"397e91b8f88a8919","type":"delay","z":"4be6db179f2af0b9","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":360,"y":210,"wires":[["900cc4787c0480a4"]]},{"id":"e53afd60b8772d51","type":"subflow:4be6db179f2af0b9","z":"82a373101348c1cf","name":"","env":[{"name":"delay","value":"600","type":"num"}],"x":300,"y":290,"wires":[["51bdcaf00d997c52"]]},{"id":"f454a9dff8307281","type":"inject","z":"82a373101348c1cf","name":"Button","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"pressed","payloadType":"str","x":130,"y":290,"wires":[["e53afd60b8772d51"]]},{"id":"4e8236565044a985","type":"inject","z":"82a373101348c1cf","name":"Stop","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"reset","payloadType":"str","x":130,"y":340,"wires":[["e53afd60b8772d51"]]},{"id":"51bdcaf00d997c52","type":"switch","z":"82a373101348c1cf","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"eq","v":"1","vt":"num"},{"t":"eq","v":"2","vt":"num"},{"t":"eq","v":"3","vt":"num"},{"t":"eq","v":"4","vt":"num"}],"checkall":"true","repair":false,"outputs":5,"x":470,"y":290,"wires":[["12b64579a34e1e41"],["91dd50b368f8428f"],["98e07bfb9e5fbd76"],[],[]]},{"id":"12b64579a34e1e41","type":"change","z":"82a373101348c1cf","name":"Stop","rules":[{"t":"set","p":"payload","pt":"msg","to":"STOP","tot":"str"},{"t":"set","p":"reset","pt":"msg","to":"reset","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":610,"y":190,"wires":[["8fcd70655a810791"]]},{"id":"91dd50b368f8428f","type":"change","z":"82a373101348c1cf","name":"10 seconds","rules":[{"t":"set","p":"delay","pt":"msg","to":"10","tot":"num"},{"t":"set","p":"value","pt":"msg","to":"10","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"ON","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":630,"y":260,"wires":[["2004f1a03d1872da"]]},{"id":"98e07bfb9e5fbd76","type":"change","z":"82a373101348c1cf","name":"20 seconds","rules":[{"t":"set","p":"delay","pt":"msg","to":"20","tot":"num"},{"t":"set","p":"value","pt":"msg","to":"20","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"ON","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":630,"y":300,"wires":[["2004f1a03d1872da"]]},{"id":"68c71ee7b2c7da5f","type":"change","z":"82a373101348c1cf","name":"30 minutes","rules":[{"t":"set","p":"delay","pt":"msg","to":"1800","tot":"num"},{"t":"set","p":"payload","pt":"msg","to":"ON","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":620,"y":90,"wires":[[]]},{"id":"7873795ee85d30bc","type":"change","z":"82a373101348c1cf","name":"60 minutes","rules":[{"t":"set","p":"delay","pt":"msg","to":"3600","tot":"num"},{"t":"set","p":"payload","pt":"msg","to":"ON","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":620,"y":130,"wires":[[]]},{"id":"2ef1831e7490d880","type":"debug","z":"82a373101348c1cf","name":"ULTIMATE MESSAGE","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":540,"y":640,"wires":[]},{"id":"8fcd70655a810791","type":"function","z":"82a373101348c1cf","name":"Track times","func":"if (msg.payload == \"STOP\")\n{\n flow.set(\"flow_delay\",0);\n return msg;\n}\n\nlet flow_delay = flow.get(\"flow_delay\") || 0;\n\nlet new_delay = msg.delay + flow_delay;\n\nmsg.delay = new_delay;\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":880,"y":280,"wires":[["074528ccb447397b"]]},{"id":"8672fa47310f28d7","type":"switch","z":"82a373101348c1cf","name":"== OFF","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"OFF","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":710,"y":410,"wires":[["ddc8ace2f59a6bfd"]]},{"id":"ddc8ace2f59a6bfd","type":"change","z":"82a373101348c1cf","name":"STOP","rules":[{"t":"set","p":"payload","pt":"msg","to":"STOP","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":370,"wires":[["8fcd70655a810791"]]},{"id":"081ac0d5f0974c32","type":"comment","z":"82a373101348c1cf","name":"Read me *","info":"These are the nodes you want.\nYou will need to make more of them to\nget 1.5 hours and 2 hours.\nThe values are in MINUTES!\n\nLook at the example nodes used\nand adjust as needed.\n\nmsg.value is NOT needed in the \nbigger picture.","x":480,"y":110,"wires":[]},{"id":"cd62a53efd514ce3","type":"comment","z":"82a373101348c1cf","name":"Read me *","info":"Press the `Button` as many times as you want.\nBut you will need to add more outputs\nto the `switch` node if more than `4`\n\n1 = 30 mins.\n2 = 60 mins.\n3 = 90 mins.\n4 = 2 hours.\n(etc)\n\n`Stop` stops all things.","x":130,"y":250,"wires":[]},{"id":"59db4e0712dee19d","type":"comment","z":"82a373101348c1cf","name":"Read me *","info":"This is set for `4` options/presses\nof the button.\nAdd more if needed.","x":470,"y":230,"wires":[]},{"id":"7f4d7544efd87231","type":"comment","z":"82a373101348c1cf","name":"Read me *","info":"Open the node below - if needed - and\nadjust the `delay` value to control how\nfast the clicking is/needs to be.\n","x":300,"y":250,"wires":[]},{"id":"c4840f7ff405a39d","type":"comment","z":"82a373101348c1cf","name":"Example values","info":"","x":630,"y":230,"wires":[]},{"id":"dedb794e18f92543","type":"debug","z":"82a373101348c1cf","name":"Remaining","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1130,"y":360,"wires":[]},{"id":"89497fb4a9ab412a","type":"function","z":"82a373101348c1cf","name":"remaining time.","func":"flow.set(\"flow_delay\",msg.payload);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":890,"y":420,"wires":[[]]},{"id":"074528ccb447397b","type":"stoptimer-varidelay","z":"82a373101348c1cf","duration":"5","durationType":"num","units":"Second","payloadtype":"str","payloadval":"OFF","name":"","reporting":"every_second","reportingformat":"seconds","persist":false,"ignoretimerpass":false,"x":500,"y":410,"wires":[[],["8672fa47310f28d7","422f74f18758af19"],["dedb794e18f92543","89497fb4a9ab412a"]]},{"id":"2004f1a03d1872da","type":"junction","z":"82a373101348c1cf","x":730,"y":280,"wires":[["fbecd3ec9736dc0e","8fcd70655a810791","422f74f18758af19"]]},{"id":"422f74f18758af19","type":"junction","z":"82a373101348c1cf","x":650,"y":480,"wires":[["872c2bc36b54739c"]]},{"id":"c166709e9bc560ee","type":"group","z":"82a373101348c1cf","name":"Not really needed","style":{"stroke":"#ff3f3f","label":true,"color":"#ff0000"},"nodes":["6dae5536098bda13","872c2bc36b54739c"],"x":674,"y":439,"w":252,"h":122},{"id":"6dae5536098bda13","type":"template","z":"82a373101348c1cf","g":"c166709e9bc560ee","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{{time}} -- {{payload}}","output":"str","x":760,"y":520,"wires":[["2ef1831e7490d880"]]},{"id":"872c2bc36b54739c","type":"function","z":"82a373101348c1cf","g":"c166709e9bc560ee","name":"time stamp message","func":"function addZero(i) {\n if (i < 10) { i = \"0\" + i }\n return i;\n}\nconst ts = new Date()\nlet hhmmss = addZero(ts.getHours()) + \":\" + addZero(ts.getMinutes()) + \":\" + addZero(ts.getSeconds())\nmsg.time = hhmmss\nreturn msg","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":800,"y":480,"wires":[["6dae5536098bda13"]]},{"id":"9befc6bf50c35625","type":"group","z":"82a373101348c1cf","name":"Not really needed","style":{"stroke":"#ff3f3f","label":true,"color":"#ff0000"},"nodes":["fbecd3ec9736dc0e","70ec6c89f1ce040e"],"x":784,"y":119,"w":232,"h":122},{"id":"fbecd3ec9736dc0e","type":"template","z":"82a373101348c1cf","g":"9befc6bf50c35625","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{{value}} -set- {{payload}}","output":"str","x":870,"y":160,"wires":[["70ec6c89f1ce040e"]]},{"id":"70ec6c89f1ce040e","type":"debug","z":"82a373101348c1cf","g":"9befc6bf50c35625","name":"middle message","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":890,"y":200,"wires":[]},{"id":"08f354719764dbaa","type":"group","z":"82a373101348c1cf","name":"TESTING","style":{"stroke":"#ff0000","label":true,"color":"#ff0000"},"nodes":["2ddd91ac7b55cf65","c6d4379949a68c85","b40be8c9d7fff916"],"x":54,"y":389,"w":172,"h":192},{"id":"2ddd91ac7b55cf65","type":"inject","z":"82a373101348c1cf","g":"08f354719764dbaa","name":"10 secs","props":[{"p":"delay","v":"70","vt":"num"},{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"ON","payloadType":"str","x":150,"y":480,"wires":[["074528ccb447397b","422f74f18758af19"]]},{"id":"c6d4379949a68c85","type":"inject","z":"82a373101348c1cf","g":"08f354719764dbaa","name":"14 secs","props":[{"p":"delay","v":"14","vt":"num"},{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"ON","payloadType":"str","x":150,"y":540,"wires":[["074528ccb447397b","422f74f18758af19"]]},{"id":"b40be8c9d7fff916","type":"inject","z":"82a373101348c1cf","g":"08f354719764dbaa","name":"STOP","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"stop","payloadType":"str","x":150,"y":430,"wires":[["074528ccb447397b"]]}]
Don't forget to update the node!
Importing this may do that. But when I updated it, I had to RESTART Node-red to get it to work.