Filtering bad data out

I have an issue with a recently installed sensor in that occasionally it sends me bad data. It is quite clearly bad as last good was 80%RH and the bad data is 0%.

I’d like a process that allows an ‘allowed’ range or else a 'maximum delta from last good` and a process option that just simply stops further processing.

For now I am going to pass the data through Node-Red and do some quality checks, but that does seem a waste.