Ingestion filters for sensors (filter out bad sensor data)

This idea sprung out of an issue over at the Z-wave-JS issue tracker.

The issue is that some devices just suck, and by that I mean they report bad data which leads to bad information in the HASS database. There are numerous issues all around on which all point to the same thing (bad devices, manufacturers that suck!). A Z-wave JS user provided an good description of typical issues faced.

My idea/suggestion/request revolves around being able to apply “ingestion” filters on sensors. For instance when you’re viewing an entity, hit the cog wheel and optional choose an (or several?) filter(s) on which data needs to pass through before it ends up in the HASS database. These filters could be existing ones like low-pass, outlier etc. and that’s really it. Bad data filtered out, and good data in our database!

And before anyone suggests it - yes I know this can be accomplished by templates/filters. The issue with that is that you need to configure a bunch of template sensors (in my case around 30 by now) which in turn ends up with mostly duplicated entities and data (yes I can rig the recorder to ignore the original sensor). It’s just a hassle to be frank, and I think this idea just hits the nail perfectly.

Also to adress the elephant in the room which is obviously manufactures not taking responsible for their bad design choices, and the head developer of Z-wave JS does make a very valid point. However I fear that with this approach we will be waiting a long time before anything significant happens.