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

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 :slight_smile:

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

Energy monitor.json (4.8 KB)

The trigger node will handle this for you.

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

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

A big thanks to everyone who offered assistance.

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

Ta muchly

1 Like