1
0
mirror of https://github.com/esphome/esphome.git synced 2025-01-19 04:20:56 +00:00

Revert "Fix filter_out bug"

This reverts commit 1ade7bcb2d14cb88fb31e134bf10ba0dfb173895.
This commit is contained in:
Otto Winter 2019-10-18 17:30:44 +02:00
parent af35c9258e
commit aebb6d2fcc
No known key found for this signature in database
GPG Key ID: DB66C0BE6013F97E

View File

@ -167,7 +167,7 @@ optional<float> 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)