If I understand you correctly try something like this
[{"id":"3632a93e.af1496","type":"inject","z":"c791cbc0.84f648","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1","payloadType":"num","x":150,"y":740,"wires":[["e759132a.fac86"]]},{"id":"e759132a.fac86","type":"switch","z":"c791cbc0.84f648","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"num"},{"t":"eq","v":"0","vt":"num"}],"checkall":"false","repair":false,"outputs":2,"x":280,"y":780,"wires":[["fc24f89f.bd8ff8"],["f26706b2.dbef28","fc24f89f.bd8ff8"]]},{"id":"fc24f89f.bd8ff8","type":"trigger","z":"c791cbc0.84f648","name":"","op1":"","op2":"x","op1type":"nul","op2type":"str","duration":"5","extend":false,"overrideDelay":false,"units":"min","reset":"0","bytopic":"all","topic":"topic","outputs":1,"x":470,"y":780,"wires":[["02f1fafdc71e278d"]]},{"id":"75495fca.b5a0a","type":"inject","z":"c791cbc0.84f648","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"0","payloadType":"num","x":150,"y":800,"wires":[["e759132a.fac86"]]},{"id":"f26706b2.dbef28","type":"change","z":"c791cbc0.84f648","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"y","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":460,"y":820,"wires":[["02f1fafdc71e278d"]]},{"id":"02f1fafdc71e278d","type":"debug","z":"c791cbc0.84f648","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":710,"y":780,"wires":[]}]