I am trying to not repeat some configuration values in a flow, but seems like some nodes don’t support mustache templates for every property.
In this case, I want to use the stop-timer, and set the “timer” property with a variable of type number. I have tried using {{ }} variable templating with no luck, global, msg, or flow context. UI just shows “Invalid properties - duration” on the stop-timer when I try to do this.
I want to use this configured duration value elsewhere in the flow, and I hate having to repeat the configuration. Specifically as I am testing this flow, I have to configure the hard-coded duration in the stop-timer AND update my flow value elsewhere, which is annoying.
Visually…below shows an example where I can use template variable for the Service in a call service node…
…and where it doesnt like it for the stoptimer property:
Really not a code issue, more about node properties and template variables inconsistently being supported I guess (yes, there is probably ANOTHER way to do what I am trying to do, after all its node-red )
In the service name I’d expect it to be start, stop, cancel (or something like that) for a timer. Is that what you are trying to put in notify_name? I’m pretty sure mustache templates work for entity id, but not sure about service name.
EDIT: just saw you say it works in service name and realised I’ve had a couple of drinks and talking rubbish
It can be set to override the delay set in the node. Stop timer does not have this option. If you need the stop action you can use stop time varidelay. You may also need to send time in as ms.
Exactly what I needed to know! I could make delay work, but like the looks of stop-timer varidelay, and the fact that I can terminate the timer on later events with STOP. Thanks Mikefila!