How to use input_number in Stoptimer?

Hi All –
I create a series of stoptimers in a particular flow, with excellent results.
However, I want to change the duration of each stoptimer based on a slider in the UI.
I created three input_number helpers, however how do I bring the values into Node Red?
I noticed that stoptimers accept either a number or an environment variable –how do I create one?
Many thanks!

You might want to use the HA globals for that.
Read my post here.

When you say “stoptimer”, do you mean node-red-contrib-stoptimer? If so, apart from the documentation being sorely lacking, the code indicates there is no way of configuring it other than through the property page - so you can’t pass in msg.duration or anything like that.

Even if as you say it can accept environment variables (I haven’t actually installed it), you can’t set their value after deployment (even if in a subflow).

I’d be looking to use the delay node instead. The stoptimer node says it’s better than delay because it can stop a timer too, but msg.reset does this (so maybe stoptimer was written before delay had this). Then you can use a current state node to get the helper, convert it to a number and multiply to get milliseconds for msg.delay (making sure you select “Override delay with msg.delay”).

EDIT: I went to install it to have a look, and it doesn’t actually look like it supports environment variables. However, it looks like somebody has created node-red-contrib-stoptimer-varidelay, which looks like it does what you want, so you might find this an easier alternative.