Then store the output and add a switch to make sure it has changed before outputting
e.g.
[{"id":"abd43b1efe575b6e","type":"subflow","name":"Debouncer with no device id","info":"","category":"","in":[{"x":60,"y":300,"wires":[{"id":"d790773867bca66f"}]}],"out":[{"x":700,"y":200,"wires":[{"id":"680d7736bf91e62c","port":0}]}],"env":[{"name":"TIME","type":"num","value":"30","ui":{"label":{"en-US":"Time"},"type":"input","opts":{"types":["num"]}}}],"meta":{},"color":"#E2D96E","status":{"x":740,"y":60,"wires":[{"id":"7b80bbdb03dac62e","port":0},{"id":"28f331b5f49e2e7a","port":0}]}},{"id":"e45f96f41e1e0823","type":"change","z":"abd43b1efe575b6e","name":"","rules":[{"t":"set","p":"delay","pt":"msg","to":"$env(\"TIME\") * 1000","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":140,"wires":[["4d1750fa2fcf2821"]]},{"id":"4d1750fa2fcf2821","type":"trigger","z":"abd43b1efe575b6e","name":"","op1":"","op2":"","op1type":"nul","op2type":"payl","duration":"30","extend":true,"overrideDelay":true,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":530,"y":140,"wires":[["e564c8966089e3f0"]]},{"id":"7b80bbdb03dac62e","type":"change","z":"abd43b1efe575b6e","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\t \"fill\":\"blue\",\t \"shape\":\"dot\",\t \"text\": \"Waiting 1\" \t}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":600,"y":60,"wires":[[]]},{"id":"680d7736bf91e62c","type":"change","z":"abd43b1efe575b6e","name":"","rules":[{"t":"set","p":"state","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":830,"y":160,"wires":[["28f331b5f49e2e7a"]]},{"id":"d790773867bca66f","type":"rbe","z":"abd43b1efe575b6e","name":"","func":"rbe","gap":"","start":"","inout":"out","septopics":true,"property":"payload","topi":"topic","x":110,"y":240,"wires":[["e45f96f41e1e0823","7b80bbdb03dac62e"]]},{"id":"e564c8966089e3f0","type":"switch","z":"abd43b1efe575b6e","name":"","property":"state","propertyType":"flow","rules":[{"t":"eq","v":"payload","vt":"msg"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":670,"y":140,"wires":[["28f331b5f49e2e7a"],["680d7736bf91e62c"]]},{"id":"28f331b5f49e2e7a","type":"change","z":"abd43b1efe575b6e","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\t \"fill\":\"blue\",\t \"shape\":\"dot\",\t \"text\": \"Waiting 0\" \t}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":840,"y":120,"wires":[[]]},{"id":"13f4f3f6ec8a6b6b","type":"inject","z":"65617ffeb779f51c","name":"","props":[{"p":"payload"},{"p":"topic1","v":"one","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"bool","x":110,"y":2480,"wires":[["04629729aa53e1b6"]]},{"id":"04629729aa53e1b6","type":"subflow:abd43b1efe575b6e","z":"65617ffeb779f51c","name":"d","env":[{"name":"TIME","value":"5","type":"num"}],"x":330,"y":2660,"wires":[["23ef1981ba506af7"]]},{"id":"3c842f8813133e41","type":"inject","z":"65617ffeb779f51c","name":"","props":[{"p":"payload"},{"p":"topic1","v":"two","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"bool","x":110,"y":2620,"wires":[["04629729aa53e1b6"]]},{"id":"68fd84d410044d24","type":"inject","z":"65617ffeb779f51c","name":"","props":[{"p":"payload"},{"p":"topic1","v":"two","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"false","payloadType":"bool","x":110,"y":2660,"wires":[["04629729aa53e1b6"]]},{"id":"084ee734bbd38a75","type":"inject","z":"65617ffeb779f51c","name":"","props":[{"p":"payload"},{"p":"topic1","v":"one","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"false","payloadType":"bool","x":110,"y":2520,"wires":[["04629729aa53e1b6"]]},{"id":"23ef1981ba506af7","type":"debug","z":"65617ffeb779f51c","name":"telegram","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":640,"y":2520,"wires":[]}]
Deselect extend delay in trigger 2 if you want the delay from the first input msg.
e.g.
[{"id":"abd43b1efe575b6e","type":"subflow","name":"Debouncer with no device id","info":"","category":"","in":[{"x":60,"y":300,"wires":[{"id":"d790773867bca66f"}]}],"out":[{"x":700,"y":200,"wires":[{"id":"680d7736bf91e62c","port":0}]}],"env":[{"name":"TIME","type":"num","value":"30","ui":{"label":{"en-US":"Time"},"type":"input","opts":{"types":["num"]}}}],"meta":{},"color":"#E2D96E","status":{"x":740,"y":60,"wires":[{"id":"7b80bbdb03dac62e","port":0},{"id":"28f331b5f49e2e7a","port":0}]}},{"id":"e45f96f41e1e0823","type":"change","z":"abd43b1efe575b6e","name":"","rules":[{"t":"set","p":"delay","pt":"msg","to":"$env(\"TIME\") * 1000","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":140,"wires":[["4d1750fa2fcf2821"]]},{"id":"4d1750fa2fcf2821","type":"trigger","z":"abd43b1efe575b6e","name":"","op1":"","op2":"","op1type":"nul","op2type":"payl","duration":"30","extend":false,"overrideDelay":true,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":530,"y":140,"wires":[["e564c8966089e3f0"]]},{"id":"7b80bbdb03dac62e","type":"change","z":"abd43b1efe575b6e","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\t \"fill\":\"blue\",\t \"shape\":\"dot\",\t \"text\": \"Waiting 1\" \t}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":600,"y":60,"wires":[[]]},{"id":"680d7736bf91e62c","type":"change","z":"abd43b1efe575b6e","name":"","rules":[{"t":"set","p":"state","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":830,"y":160,"wires":[["28f331b5f49e2e7a"]]},{"id":"d790773867bca66f","type":"rbe","z":"abd43b1efe575b6e","name":"","func":"rbe","gap":"","start":"","inout":"out","septopics":true,"property":"payload","topi":"topic","x":110,"y":240,"wires":[["e45f96f41e1e0823","7b80bbdb03dac62e"]]},{"id":"e564c8966089e3f0","type":"switch","z":"abd43b1efe575b6e","name":"","property":"state","propertyType":"flow","rules":[{"t":"eq","v":"payload","vt":"msg"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":670,"y":140,"wires":[["28f331b5f49e2e7a"],["680d7736bf91e62c"]]},{"id":"28f331b5f49e2e7a","type":"change","z":"abd43b1efe575b6e","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\t \"fill\":\"blue\",\t \"shape\":\"dot\",\t \"text\": \"Waiting 0\" \t}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":840,"y":120,"wires":[[]]},{"id":"13f4f3f6ec8a6b6b","type":"inject","z":"65617ffeb779f51c","name":"","props":[{"p":"payload"},{"p":"topic1","v":"one","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"bool","x":110,"y":2480,"wires":[["04629729aa53e1b6"]]},{"id":"04629729aa53e1b6","type":"subflow:abd43b1efe575b6e","z":"65617ffeb779f51c","name":"d","env":[{"name":"TIME","value":"5","type":"num"}],"x":330,"y":2660,"wires":[["23ef1981ba506af7"]]},{"id":"3c842f8813133e41","type":"inject","z":"65617ffeb779f51c","name":"","props":[{"p":"payload"},{"p":"topic1","v":"two","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"bool","x":110,"y":2620,"wires":[["04629729aa53e1b6"]]},{"id":"68fd84d410044d24","type":"inject","z":"65617ffeb779f51c","name":"","props":[{"p":"payload"},{"p":"topic1","v":"two","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"false","payloadType":"bool","x":110,"y":2660,"wires":[["04629729aa53e1b6"]]},{"id":"084ee734bbd38a75","type":"inject","z":"65617ffeb779f51c","name":"","props":[{"p":"payload"},{"p":"topic1","v":"one","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"false","payloadType":"bool","x":110,"y":2520,"wires":[["04629729aa53e1b6"]]},{"id":"23ef1981ba506af7","type":"debug","z":"65617ffeb779f51c","name":"telegram","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":640,"y":2520,"wires":[]}]
[edited both flows, first will extend delay, second will not]
[edit] Just for completeness here is the multi id property version, that will handle multiple devices with a device id property.
[{"id":"46dafb0003a660d7","type":"subflow","name":"deboucer with device topic","info":"","category":"","in":[{"x":60,"y":280,"wires":[{"id":"a75434f7efe4421b"}]}],"out":[{"x":1260,"y":140,"wires":[{"id":"93823310d0ff6309","port":0}]}],"env":[{"name":"TIME","type":"num","value":"30","ui":{"icon":"font-awesome/fa-clock-o","label":{"en-US":"Time [sec.]"},"type":"input","opts":{"types":["num"]}}},{"name":"device","type":"str","value":"topic","ui":{"label":{"en-US":"Device Property"},"type":"input","opts":{"types":["str"]}}}],"meta":{},"color":"#E2D96E","icon":"node-red/rbe.png","status":{"x":620,"y":40,"wires":[{"id":"7b1c74085c4ec673","port":0}]}},{"id":"4e57370fe77077c2","type":"rbe","z":"46dafb0003a660d7","name":"","func":"rbe","gap":"","start":"","inout":"out","septopics":true,"property":"payload","topi":"device_topic","x":170,"y":180,"wires":[["84d0fcd69a374950"]]},{"id":"626d74dc96a5586e","type":"trigger","z":"46dafb0003a660d7","name":"","op1":"","op2":"","op1type":"nul","op2type":"payl","duration":"30","extend":true,"overrideDelay":true,"units":"s","reset":"","bytopic":"topic","topic":"device_topic","outputs":1,"x":450,"y":120,"wires":[["70023439ab0fa9cf"]]},{"id":"84d0fcd69a374950","type":"change","z":"46dafb0003a660d7","name":"","rules":[{"t":"set","p":"waiting[msg.device_topic]","pt":"flow","to":"device_topic","tot":"msg"},{"t":"set","p":"delay","pt":"msg","to":"$env(\"TIME\") * 1000","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":280,"y":100,"wires":[["7b1c74085c4ec673","626d74dc96a5586e"]]},{"id":"7b1c74085c4ec673","type":"change","z":"46dafb0003a660d7","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\t \"fill\":\"blue\",\t \"shape\":\"dot\",\t \"text\": \"Waiting \" & $join($flowContext(\"waiting\").*, \", \")\t}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":480,"y":40,"wires":[[]]},{"id":"bc18c5cfc9f784f3","type":"change","z":"46dafb0003a660d7","name":"","rules":[{"t":"set","p":"device_state[msg.device_topic]","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":840,"y":140,"wires":[["764516c62818c577","93823310d0ff6309"]]},{"id":"14e62201a27610c5","type":"switch","z":"46dafb0003a660d7","name":"","property":"device_topic","propertyType":"msg","rules":[{"t":"nnull"}],"checkall":"true","repair":false,"outputs":1,"x":170,"y":220,"wires":[["4e57370fe77077c2"]]},{"id":"a75434f7efe4421b","type":"change","z":"46dafb0003a660d7","name":"","rules":[{"t":"set","p":"device_topic","pt":"msg","to":"${device}","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":200,"y":280,"wires":[["14e62201a27610c5"]]},{"id":"70023439ab0fa9cf","type":"switch","z":"46dafb0003a660d7","name":"","property":"device_state[msg.device_topic]","propertyType":"flow","rules":[{"t":"eq","v":"payload","vt":"msg"},{"t":"else"}],"checkall":"false","repair":false,"outputs":2,"x":610,"y":120,"wires":[["764516c62818c577"],["bc18c5cfc9f784f3"]]},{"id":"764516c62818c577","type":"change","z":"46dafb0003a660d7","name":"","rules":[{"t":"delete","p":"waiting[msg.device_topic]","pt":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":890,"y":80,"wires":[["7b1c74085c4ec673"]]},{"id":"93823310d0ff6309","type":"change","z":"46dafb0003a660d7","name":"","rules":[{"t":"delete","p":"delay","pt":"msg"},{"t":"delete","p":"device_topic","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1120,"y":140,"wires":[[]]},{"id":"13f4f3f6ec8a6b6b","type":"inject","z":"65617ffeb779f51c","name":"","props":[{"p":"payload"},{"p":"topic1","v":"one","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"bool","x":110,"y":2480,"wires":[["90d96e6793d607bb"]]},{"id":"90d96e6793d607bb","type":"subflow:46dafb0003a660d7","z":"65617ffeb779f51c","name":"","env":[{"name":"TIME","value":"5","type":"num"},{"name":"device","value":"topic1","type":"str"}],"x":440,"y":2520,"wires":[["23ef1981ba506af7"]]},{"id":"3c842f8813133e41","type":"inject","z":"65617ffeb779f51c","name":"","props":[{"p":"payload"},{"p":"topic1","v":"two","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"bool","x":110,"y":2620,"wires":[["90d96e6793d607bb"]]},{"id":"68fd84d410044d24","type":"inject","z":"65617ffeb779f51c","name":"","props":[{"p":"payload"},{"p":"topic1","v":"two","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"false","payloadType":"bool","x":110,"y":2660,"wires":[["90d96e6793d607bb"]]},{"id":"084ee734bbd38a75","type":"inject","z":"65617ffeb779f51c","name":"","props":[{"p":"payload"},{"p":"topic1","v":"one","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"false","payloadType":"bool","x":110,"y":2520,"wires":[["90d96e6793d607bb"]]},{"id":"23ef1981ba506af7","type":"debug","z":"65617ffeb779f51c","name":"telegram","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":640,"y":2520,"wires":[]}]