# How to use variables on a ha-wait-until node timeout parameter?

**URL:** <https://discourse.nodered.org/t/how-to-use-variables-on-a-ha-wait-until-node-timeout-parameter/38356>\
**Category:** General\
**Created:** [1 January 2021 14:54 UTC](https://discourse.nodered.org/t/how-to-use-variables-on-a-ha-wait-until-node-timeout-parameter/38356 "2021-01-01T14:54:31Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![flowingcarving](https://avatars.discourse-cdn.com/v4/letter/f/2acd7d/32.png) [@flowingcarving](https://discourse.nodered.org/u/flowingcarving)\
**Post date:** [1 January 2021 14:54 UTC](https://discourse.nodered.org/t/how-to-use-variables-on-a-ha-wait-until-node-timeout-parameter/38356/1 "2021-01-01T14:54:32Z")

</div>

I have a subflow, which has a ha-wait-until node in it. When I put variable notation (maybe this is the correct term?), I get only one output for the node. When I put numbers in, I get two output nodes as expected.

With pictures, the problematic situation, only one output:

 ![nah](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/5/e55252141beacf9a31900e9ad006504219578071.png)

Two outputs when values are entered to timeout and wait until value fields:

 ![surething](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/9/0991c30f83ff5244b297d8b80b59c387eed088e4.png)

How can I get two output nodes when using variables in the timeout and wait until parameter fields?

---

<div class="post-metadata">

**Author:** ![flowingcarving](https://avatars.discourse-cdn.com/v4/letter/f/2acd7d/32.png) [@flowingcarving](https://discourse.nodered.org/u/flowingcarving)\
**Post date:** [1 January 2021 15:21 UTC](https://discourse.nodered.org/t/how-to-use-variables-on-a-ha-wait-until-node-timeout-parameter/38356/2 "2021-01-01T15:21:10Z")

</div>

Just noticed from the node documentation, that only the Entity ID accepts Mustache Templates. So that's the explanation why it doesn't work with other fields. So do I have to pass the parameters within the msg object then?

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [1 January 2021 15:42 UTC](https://discourse.nodered.org/t/how-to-use-variables-on-a-ha-wait-until-node-timeout-parameter/38356/3 "2021-01-01T15:42:57Z")

</div>

What options do you get when you select the chevron to the right?

---

<div class="post-metadata">

**Author:** ![flowingcarving](https://avatars.discourse-cdn.com/v4/letter/f/2acd7d/32.png) [@flowingcarving](https://discourse.nodered.org/u/flowingcarving)\
**Post date:** [1 January 2021 15:50 UTC](https://discourse.nodered.org/t/how-to-use-variables-on-a-ha-wait-until-node-timeout-parameter/38356/4 "2021-01-01T15:50:25Z")

</div>

Number and expression.

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [1 January 2021 15:52 UTC](https://discourse.nodered.org/t/how-to-use-variables-on-a-ha-wait-until-node-timeout-parameter/38356/5 "2021-01-01T15:52:57Z")

</div>

This is a HA node, non standard, so i do not have it.. What do you mean expression? Whats the symbol?

---

<div class="post-metadata">

**Author:** ![flowingcarving](https://avatars.discourse-cdn.com/v4/letter/f/2acd7d/32.png) [@flowingcarving](https://discourse.nodered.org/u/flowingcarving)\
**Post date:** [1 January 2021 15:55 UTC](https://discourse.nodered.org/t/how-to-use-variables-on-a-ha-wait-until-node-timeout-parameter/38356/6 "2021-01-01T15:55:09Z")

</div>

Did you mean this?  
 ![exp](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/7/c7d29649785f49edc7641c9accd874fe362914d3.png)

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [1 January 2021 15:58 UTC](https://discourse.nodered.org/t/how-to-use-variables-on-a-ha-wait-until-node-timeout-parameter/38356/7 "2021-01-01T15:58:13Z")

</div>

you should be able to access  
msg.timeout in J:expression

just type `timeout`  
or enviro variable  
`$env("timeout")`

---

<div class="post-metadata">

**Author:** ![flowingcarving](https://avatars.discourse-cdn.com/v4/letter/f/2acd7d/32.png) [@flowingcarving](https://discourse.nodered.org/u/flowingcarving)\
**Post date:** [1 January 2021 16:08 UTC](https://discourse.nodered.org/t/how-to-use-variables-on-a-ha-wait-until-node-timeout-parameter/38356/8 "2021-01-01T16:08:20Z")

</div>

Yes, thanks so much :)! The $env("timeout") did the trick. I did not know the way main flow communicates with the subflow. Good to know!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [15 January 2021 16:08 UTC](https://discourse.nodered.org/t/how-to-use-variables-on-a-ha-wait-until-node-timeout-parameter/38356/9 "2021-01-15T16:08:25Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
