However, sometimes there is a measurement value, e.g. 970 HPa, and earlier and later measurements show, for example, something around 1020 HPa.
So I would like to omit the measurement that differs from the previous one by more than, for example, 10 HPa because it is impossible for 2 minutes to change by more than 10 HPa.
Of course, the difference between the previous and the current measurement can be negative or positive. So absolute value is important.
How do I create an "IF" statement that checks this on one line?
In my case it is as follows:
- the %v3% variable contains the value of the previous measurement
- the [BME680#Pressure] variable contains the value of the current measurement
Rule should look something like this:
Code: Select all
If (condition)
// rest of "if" procedure
Let, 3, [BME680#Pressure]
EndIf
To get rid of possible incorrect measurements after initialization of the device, the measurements are taken into account only 5 minutes after the device is started and during these 5 minutes all measurements are entered into the %v3% variable, regardless of whether they are meaningful or not, but not sent to Domoticz