@Trying_to_learn i know this is what i have until now i kinda everithing that i need but i need to join it.
[{"id":"763e3b57.a7e4a4","type":"ui_text","z":"217dd16.38f122e","group":"141b826d.d51e0e","order":2,"width":"","height":"","name":"Time:","label":"Time:","format":"{{msg.payload}}","layout":"","x":1050,"y":640,"wires":[]},{"id":"577c9ede.3ec36","type":"function","z":"217dd16.38f122e","name":"Calculate time","func":"global.set(msg.topic,msg.payload);\nvar hour = global.get(\"timehour\");\nvar minute = global.get(\"timeminute\");\nif (hour!==undefined && minute!==undefined) {\n var mytime = new Date();\n mytime.setHours(hour, minute, 0);\n mytime.setMilliseconds(0);\n mytime.setFullYear(2000,01,01);\n global.set(\"start\",mytime.getTime());\n}\nmsg.payload = hour + \":\" + minute;\nreturn msg;","outputs":1,"noerr":2,"x":868,"y":641,"wires":[["763e3b57.a7e4a4"]]},{"id":"5061166f.4dd8d8","type":"ui_dropdown","z":"217dd16.38f122e","name":"Hour","label":"Hour","tooltip":"","place":"","group":"141b826d.d51e0e","order":3,"width":0,"height":0,"passthru":true,"options":[{"label":"00","value":"0","type":"str"},{"label":"01","value":"1","type":"str"},{"label":"02","value":"2","type":"str"},{"label":"03","value":"3","type":"str"},{"label":"04","value":"4","type":"str"},{"label":"05","value":"5","type":"str"},{"label":"06","value":"6","type":"str"},{"label":"07","value":"7","type":"str"},{"label":"08","value":"8","type":"str"},{"label":"09","value":"9","type":"str"},{"label":"10","value":"10","type":"str"},{"label":"11","value":"11","type":"str"},{"label":"12","value":"12","type":"str"},{"label":"13","value":"13","type":"str"},{"label":"14","value":"14","type":"str"},{"label":"15","value":"15","type":"str"},{"label":"16","value":"16","type":"str"},{"label":"17","value":"17","type":"str"},{"label":"18","value":"18","type":"str"},{"label":"19","value":"19","type":"str"},{"label":"20","value":"20","type":"str"},{"label":"21","value":"21","type":"str"},{"label":"22","value":"22","type":"str"},{"label":"23","value":"23","type":"str"}],"payload":"","topic":"timehour","x":658,"y":627,"wires":[["577c9ede.3ec36"]]},{"id":"bcbea3a4.17f92","type":"ui_dropdown","z":"217dd16.38f122e","name":"Minute","label":"Minute","tooltip":"","place":"","group":"141b826d.d51e0e","order":4,"width":0,"height":0,"passthru":true,"options":[{"label":"00","value":"0","type":"str"},{"label":"01","value":"1","type":"str"},{"label":"02","value":"2","type":"str"},{"label":"03","value":"3","type":"str"},{"label":"04","value":"4","type":"str"},{"label":"05","value":"5","type":"str"},{"label":"06","value":"6","type":"str"},{"label":"07","value":"7","type":"str"},{"label":"08","value":"8","type":"str"},{"label":"09","value":"9","type":"str"},{"label":"10","value":"10","type":"str"},{"label":"11","value":"11","type":"str"},{"label":"12","value":"12","type":"str"},{"label":"13","value":"13","type":"str"},{"label":"14","value":"14","type":"str"},{"label":"15","value":"15","type":"str"},{"label":"16","value":"16","type":"str"},{"label":"17","value":"17","type":"str"},{"label":"18","value":"18","type":"str"},{"label":"19","value":"19","type":"str"},{"label":"20","value":"20","type":"str"},{"label":"21","value":"21","type":"str"},{"label":"22","value":"22","type":"str"},{"label":"23","value":"23","type":"str"},{"label":"24","value":"24","type":"str"},{"label":"25","value":"25","type":"str"},{"label":"26","value":"26","type":"str"},{"label":"27","value":"27","type":"str"},{"label":"28","value":"28","type":"str"},{"label":"29","value":"29","type":"str"},{"label":"30","value":"30","type":"str"},{"label":"31","value":"31","type":"str"},{"label":"32","value":"32","type":"str"},{"label":"33","value":"33","type":"str"},{"label":"34","value":"34","type":"str"},{"label":"35","value":"35","type":"str"},{"label":"36","value":"36","type":"str"},{"label":"37","value":"37","type":"str"},{"label":"38","value":"38","type":"str"},{"label":"39","value":"39","type":"str"},{"label":"40","value":"40","type":"str"},{"label":"41","value":"41","type":"str"},{"label":"42","value":"42","type":"str"},{"label":"43","value":"43","type":"str"},{"label":"44","value":"44","type":"str"},{"label":"45","value":"45","type":"str"},{"label":"46","value":"46","type":"str"},{"label":"47","value":"47","type":"str"},{"label":"48","value":"48","type":"str"},{"label":"49","value":"49","type":"str"},{"label":"50","value":"50","type":"str"},{"label":"51","value":"51","type":"str"},{"label":"52","value":"52","type":"str"},{"label":"53","value":"53","type":"str"},{"label":"54","value":"54","type":"str"},{"label":"55","value":"55","type":"str"},{"label":"56","value":"56","type":"str"},{"label":"57","value":"57","type":"str"},{"label":"58","value":"58","type":"str"},{"label":"59","value":"59","type":"str"}],"payload":"","topic":"timeminute","x":657,"y":670,"wires":[["577c9ede.3ec36"]]},{"id":"cfc3c08f.ca39f","type":"ui_switch","z":"217dd16.38f122e","name":"Lamp","label":"Lamp","tooltip":"","group":"615b9ae0.a9d4c4","order":1,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"room/lamp","style":"","onvalue":"on","onvalueType":"str","onicon":"","oncolor":"","offvalue":"off","offvalueType":"str","officon":"","offcolor":"","x":890,"y":760,"wires":[["be71ba07.d9ec58"]]},{"id":"be71ba07.d9ec58","type":"mqtt out","z":"217dd16.38f122e","name":"Lamp","topic":"room/lamp","qos":"2","retain":"","broker":"865f61ef.13d","x":1150,"y":760,"wires":[]},{"id":"e0d7f45d.3da998","type":"function","z":"217dd16.38f122e","name":"Sleep Timer","func":"\nvar value = context.get('value') || 60000;\n\nif (msg.topic == \"value\")\n{\n value = msg.payload * 60000;\n context.set('value',value); \n}\n\nelse if (msg.topic == \"start\")\n{\n\nvar timer = setTimeout(function(){msg.payload = \"off\";node.send([msg,{ payload: \"Ende\" }]);var countdownstop = context.get('countdown');clearInterval(countdownstop)},value);\ncontext.set('timer',timer); \n\nvar count = value/60000;\n//count = count -1 ;\nmsg.payload=count;\nnode.send([null,msg]);\nvar countdown = setInterval(function() {count=count-1;msg.payload=count; node.send([null,msg]) }, 60000);\ncontext.set('countdown',countdown);\n\n}\n\nelse if (msg.topic == \"stop\")\n{\nvar timerstop = context.get('timer')\nclearTimeout(timerstop);\n\nvar countdownstop = context.get('countdown')\nclearInterval(countdownstop);\n\n}\n\n\n","outputs":"2","noerr":0,"x":870,"y":900,"wires":[["5080012f.84d6e"],["3217a67a.49beca"]]},{"id":"e28ce442.b64738","type":"ui_button","z":"217dd16.38f122e","name":"","group":"dd70e446.dbe258","order":3,"width":"3","height":"1","passthru":false,"label":"Start","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"start","x":630,"y":880,"wires":[["e0d7f45d.3da998"]]},{"id":"fb5725f2.1d12c8","type":"ui_numeric","z":"217dd16.38f122e","name":"","label":"Sleep timer in minutes","tooltip":"","group":"dd70e446.dbe258","order":2,"width":"0","height":"0","wrap":false,"passthru":true,"topic":"value","format":"{{value}}","min":"1","max":"300","step":1,"x":670,"y":960,"wires":[["e0d7f45d.3da998"]]},{"id":"f5fd6fd8.5748","type":"ui_button","z":"217dd16.38f122e","name":"","group":"dd70e446.dbe258","order":4,"width":"3","height":"1","passthru":false,"label":"Stop","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"stop","x":630,"y":920,"wires":[["e0d7f45d.3da998"]]},{"id":"3217a67a.49beca","type":"ui_text","z":"217dd16.38f122e","group":"dd70e446.dbe258","order":5,"width":0,"height":0,"name":"","label":"Time left","format":"{{msg.payload}} Minuten","layout":"row-spread","x":1040,"y":920,"wires":[]},{"id":"5080012f.84d6e","type":"debug","z":"217dd16.38f122e","name":"","active":true,"console":"false","complete":"false","x":1050,"y":860,"wires":[]},{"id":"141b826d.d51e0e","type":"ui_group","z":"","name":"Start Time","tab":"24e77315.a6b31c","order":1,"disp":true,"width":"6"},{"id":"615b9ae0.a9d4c4","type":"ui_group","z":"","name":"Lamp","tab":"8f4c42b3.c0e6","order":2,"disp":true,"width":"6","collapse":false},{"id":"865f61ef.13d","type":"mqtt-broker","z":"","name":"","broker":"192.168.43.47","port":"1883","clientid":"TEST","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"dd70e446.dbe258","type":"ui_group","z":"","name":"Sockets","tab":"8563fc7f.df68","disp":true,"width":"6","collapse":false},{"id":"24e77315.a6b31c","type":"ui_tab","z":"","name":"Irrigation","icon":"call_split","order":2},{"id":"8f4c42b3.c0e6","type":"ui_tab","z":"","name":"dropdown","icon":"dashboard","order":1,"disabled":false,"hidden":false},{"id":"8563fc7f.df68","type":"ui_tab","z":"","name":"bedroom","icon":"fa-bed","disabled":false,"hidden":false}]