From aebb6d2fcccc7461df8161c88909d868e2bb1e59 Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Fri, 18 Oct 2019 17:30:44 +0200 Subject: [PATCH] Revert "Fix filter_out bug" This reverts commit 1ade7bcb2d14cb88fb31e134bf10ba0dfb173895. --- esphome/components/sensor/filter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/components/sensor/filter.cpp b/esphome/components/sensor/filter.cpp index 6a93cefaaf..f7a5b5d7ad 100644 --- a/esphome/components/sensor/filter.cpp +++ b/esphome/components/sensor/filter.cpp @@ -167,7 +167,7 @@ optional FilterOutValueFilter::new_value(float value) { return value; } else { int8_t accuracy = this->parent_->get_accuracy_decimals(); - float accuracy_mult = pow10f(-accuracy); + float accuracy_mult = pow10f(accuracy); float rounded_filter_out = roundf(accuracy_mult * this->value_to_filter_out_); float rounded_value = roundf(accuracy_mult * value); if (rounded_filter_out == rounded_value)