Currently using an Apollo AIR-1 with Home Assistant, which is an awesome air quality monitor; however, I am not sure if there is a bug in HA, the sensor or something else, every so often, values for Humidity for example will drop to near-zero for a single read. Then, I get an email alert for a false alarm.
Questions:
Is there a parameter to deal with these false positives built into HA?
If not, how would one develop a rule such that if the threshold is breached, for example (humidity < 35%) at least 3 times in the last 15 minutes? If I were able to develop a rule like this, I would stop getting emails about humidity being misreported as shown below:
The same problem happens where temperature will jump ~10F for a single reading and then go back to normal, but I keep getting alerts for these false positives:
The simple fix is to add a for: duration to your trigger in your automation, so for example the humidity has to drop below 35% and remain below 35% for 2 minutes.
You could also create an entity that mimics the value of the humidity sensor but filters out the spikes:
Create your own logic and implement it with a trigger-based template sensor. I would do something like: If new state < 70% of previous state, use previous state instead. Else use new state.