# Passing output from a range if it hasn't changed in the last n minutes

**URL:** <https://discourse.nodered.org/t/passing-output-from-a-range-if-it-hasnt-changed-in-the-last-n-minutes/61288>\
**Category:** General\
**Created:** [14 April 2022 12:10 UTC](https://discourse.nodered.org/t/passing-output-from-a-range-if-it-hasnt-changed-in-the-last-n-minutes/61288 "2022-04-14T12:10:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![BerkshireBugsy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/berkshirebugsy/32/55921_2.png) [@BerkshireBugsy](https://discourse.nodered.org/u/BerkshireBugsy)\
**Post date:** [14 April 2022 12:10 UTC](https://discourse.nodered.org/t/passing-output-from-a-range-if-it-hasnt-changed-in-the-last-n-minutes/61288/1 "2022-04-14T12:10:32Z")

</div>

I am creating a flow in Node Red (HA)which changes the colour of the light on an Amazon Flex device depending on what range the electricity consumption of the house is.

The entity (We will call it Emoncms Import) contains the amount of power coming into the house and this is picked up by a state node. I then pass this into a range note which gives me an output of 1,2 or 3 depending on the intake into the house - if the solar panels are doing their job then this will be negative but the doesn't matter for this.

Most of this I have working except for the fact that I only want to pass the traffic from the range object to the switch (which splits the traffic 3 ways depending on the output of the range) if the value from the range hasn't changed in the last 15 minutes.

There is probably a simple way of doing this but I can't work it out 🙂

I will past my flow below - thank you everyone in advance.

[Energy monitor.json](https://discourse.nodered.org/uploads/short-url/jM6QTfCeWutoy6TRIGo4BBGYN2z.json) (4.8 KB)

---

<div class="post-metadata">

**Author:** ![PLCMercenary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/plcmercenary/32/48855_2.png) [@PLCMercenary](https://discourse.nodered.org/u/PLCMercenary)\
**Post date:** [14 April 2022 14:38 UTC](https://discourse.nodered.org/t/passing-output-from-a-range-if-it-hasnt-changed-in-the-last-n-minutes/61288/2 "2022-04-14T14:38:38Z")

</div>

The trigger node will handle this for you.

---

<div class="post-metadata">

**Author:** ![PLCMercenary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/plcmercenary/32/48855_2.png) [@PLCMercenary](https://discourse.nodered.org/u/PLCMercenary)\
**Post date:** [14 April 2022 14:45 UTC](https://discourse.nodered.org/t/passing-output-from-a-range-if-it-hasnt-changed-in-the-last-n-minutes/61288/3 "2022-04-14T14:45:11Z")

</div>

More specifically you can use an RBE (or a filter node its called now i believe) and a trigger node together to accomplish this.

---

<div class="post-metadata">

**Author:** ![BerkshireBugsy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/berkshirebugsy/32/55921_2.png) [@BerkshireBugsy](https://discourse.nodered.org/u/BerkshireBugsy)\
**Post date:** [14 April 2022 14:52 UTC](https://discourse.nodered.org/t/passing-output-from-a-range-if-it-hasnt-changed-in-the-last-n-minutes/61288/4 "2022-04-14T14:52:47Z")

</div>

Thank you - i will have a look in a bit. I thought i had looked at the rbe and dor aome reason duscounted it.

---

<div class="post-metadata">

**Author:** ![BerkshireBugsy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/berkshirebugsy/32/55921_2.png) [@BerkshireBugsy](https://discourse.nodered.org/u/BerkshireBugsy)\
**Post date:** [18 April 2022 18:52 UTC](https://discourse.nodered.org/t/passing-output-from-a-range-if-it-hasnt-changed-in-the-last-n-minutes/61288/5 "2022-04-18T18:52:27Z")

</div>

A big thanks to everyone who offered assistance.

A combination of a trigger and rbe sorted ot for me.

Ta muchly

---

<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:** [17 June 2022 18:53 UTC](https://discourse.nodered.org/t/passing-output-from-a-range-if-it-hasnt-changed-in-the-last-n-minutes/61288/6 "2022-06-17T18:53:10Z")

</div>

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