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 (4.8 KB)