# Asymmetric deadband settings in filter node

**URL:** <https://discourse.nodered.org/t/asymmetric-deadband-settings-in-filter-node/87722>\
**Category:** Feature Requests\
**Created:** [5 May 2024 13:25 UTC](https://discourse.nodered.org/t/asymmetric-deadband-settings-in-filter-node/87722 "2024-05-05T13:25:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![fhteagle](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fhteagle/32/90689_2.png) [@fhteagle](https://discourse.nodered.org/u/fhteagle)\
**Post date:** [5 May 2024 13:25 UTC](https://discourse.nodered.org/t/asymmetric-deadband-settings-in-filter-node/87722/1 "2024-05-05T13:25:03Z")

</div>

Hi all,

New to Node Red, and had a corner case that I could not seem to accomplish with core nodes. I wanted to filter out all messages where a specific value was decreasing (items in a to do list), and only allow increasing values to continue in the flow. At first I tried using the node red supplied filter node, but this was also allowing through a value delta of -1, not just +1. I ended up creating a more complicated flow that stashed the value in the flow context, read it back out, used a switch node to "filter" out decreasing messages via the \> operator, etc. Then I realized this was basically what the filter node was already doing anyway, but I just could not find a way to configure the filter node to get what I wanted in the first place.

So, my question is "Was there a more elegant way to accomplish this functionality that I did not stumble upon in my searching?". If the answer is no, then please consider this a feature request for being able to set the filter node to:

- have different deadband exclusion parameters for an increase in value or decrease in value compared to last
- have the deadband extend to infinity in one direction (i.e. filter all decreasing values)
- consider also allowing asymmetric and infinite narrowband configuration as well?

Thanks

- DH

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [5 May 2024 16:05 UTC](https://discourse.nodered.org/t/asymmetric-deadband-settings-in-filter-node/87722/2 "2024-05-05T16:05:30Z")

</div>

I would think that most of us would simply record the previous value to context and then use a switch to compare new with old.

---

<div class="post-metadata">

**Author:** ![fhteagle](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fhteagle/32/90689_2.png) [@fhteagle](https://discourse.nodered.org/u/fhteagle)\
**Post date:** [5 May 2024 16:50 UTC](https://discourse.nodered.org/t/asymmetric-deadband-settings-in-filter-node/87722/3 "2024-05-05T16:50:54Z")

</div>

I did stumble across a more elegant solution for this exact use case, thanks to the Home Assistant state change node providing the previous state value also...

But I think this FR still has some merit for increasing the functionality of the filter node, though I will concede that this FR is not a huge priority.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [5 May 2024 19:53 UTC](https://discourse.nodered.org/t/asymmetric-deadband-settings-in-filter-node/87722/4 "2024-05-05T19:53:26Z")

</div>

There are plenty of nodes in the catalogue, probably worth having a browse at gates and perhaps finite state machine nodes? Some of these may well do what you are looking for.

---

<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:** [4 July 2024 19:54 UTC](https://discourse.nodered.org/t/asymmetric-deadband-settings-in-filter-node/87722/5 "2024-07-04T19:54:14Z")

</div>

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