Not sure who @Trying_to_learn was asking. My previous comment was adding a function node, like below. I was in a rush out the door so I couldn't create it then.
But to fix the flow I posted above, @davenrea can try this:
[{"id":"0e3463d5de466243","type":"mytimeout","z":"b431bcd1.51942","name":"","outtopic":"","outsafe":"1","outwarning":"Warning","outunsafe":"0","warning":"5","timer":"30","debug":false,"ndebug":false,"ignoreCase":false,"repeat":false,"again":false,"x":1150,"y":520,"wires":[["36212b13c94b889c"],[]]},{"id":"2c5b32d1bbd3d6f8","type":"inject","z":"b431bcd1.51942","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":"0.2","topic":"","payload":"1","payloadType":"str","x":990,"y":420,"wires":[["0e3463d5de466243"]]},{"id":"ba574d575218a5ea","type":"debug","z":"b431bcd1.51942","name":"OneZero","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1357.895751953125,"y":406.8888854980469,"wires":[]},{"id":"93e9f666382d3fe5","type":"inject","z":"b431bcd1.51942","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":"0.2","topic":"","payload":"0","payloadType":"str","x":990,"y":600,"wires":[["0e3463d5de466243"]]},{"id":"36212b13c94b889c","type":"function","z":"b431bcd1.51942","name":"function 1","func":"try{\n msg.payload = parseInt(msg.payload);\n return msg;\n} catch (error) {\n // Do these two line as an example\n msg.payload = error;\n return msg;\n // In actual code you can do this\n //node.log(\"myTimeout: \" +error);\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1260,"y":460,"wires":[["ba574d575218a5ea"]]}]
The catch will catch the "warning" string as NaN. You can comment that out and uncomment the log code instead and you should only log the NaN instead.
In my myTimeout node I'll be trying to do something similar. but I need to make sure I keep the string functionality. I also need to figure out how to accept it from the properties dialog also. Not sure how I'm going to approach this yet.