# Delay and intermediate messages

**URL:** <https://discourse.nodered.org/t/delay-and-intermediate-messages/7970>\
**Category:** General\
**Created:** [14 February 2019 19:16 UTC](https://discourse.nodered.org/t/delay-and-intermediate-messages/7970 "2019-02-14T19:16:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![beireken](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/beireken/32/6391_2.png) [@beireken](https://discourse.nodered.org/u/beireken)\
**Post date:** [14 February 2019 19:16 UTC](https://discourse.nodered.org/t/delay-and-intermediate-messages/7970/1 "2019-02-14T19:16:43Z")

</div>

Hello,

This will be a simple one for most of you i think...

I have a temperature payload that i send through a switch node to detect when it goes higher than a certain value.  
When it does go higher i want to trigger an output, but it should be triggered for more than x mins time.  
Same applies for when i gets disabled, it should be off for min x time.

I now have a delay node behind each output of the switch node, but i think intermediate messages will just get delayed also?  
My goal is to prevent too many on/of cycles of the output because of rapid changes on the input, how can i achive this in node-red?

Thank you all in advance!

---

<div class="post-metadata">

**Author:** ![JayDickson](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jaydickson/32/90592_2.png) [@JayDickson](https://discourse.nodered.org/u/JayDickson)\
**Post date:** [14 February 2019 19:19 UTC](https://discourse.nodered.org/t/delay-and-intermediate-messages/7970/2 "2019-02-14T19:19:31Z")

</div>

It can be done a number of ways using the built in nodes, but my "aha moment" for working with that kind of logic came while working with the [mytimeout](https://www.npmjs.com/package/node-red-contrib-mytimeout) node.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [14 February 2019 19:49 UTC](https://discourse.nodered.org/t/delay-and-intermediate-messages/7970/3 "2019-02-14T19:49:47Z")

</div>

you are using the right word... look at the trigger node
