I use multiple temperature sensors per room to calculate average, min and max temps that drive my heatpump automation. However, sometimes a temperature sensor seems stale at a certain level, or drop out (i.e. when a battery had been drained). It must be possible to detect the false sensor and exclude it when it has no serious value. and thus exclude it from the calulations. But what would be a nice approach for this?
Suppose we have 3 sensors with their value:
S1 - 18
S2 - 19
S3 - 5
how can we easily determine that S3 has an deviation > 2?
Was investigating this and came up with the following:
Calculate the average value of all sensors in the cluster
if a sensor value plus a margin of let’s say 20% of avg minus the average value is negtive, than we have a bad value and exclude the value from the cluster as shown in this diagram:
To piggyback off @petro… If you regularly have sensors with “non-serious” values that are not unavailable, consider using the “Combine sensor values” helper, but use “Median” as your stats method instead of “Arithmetic mean”. Taking your example values, mean would return 13.6, but median would return a more reasonable 18.
That is exactly what I was looking for:
Even if it is available (as in the example) the sensor value should be corrected to a good estimation of the average value. Thanx!