diff --git a/esphome/components/sensor/filter.cpp b/esphome/components/sensor/filter.cpp index d1cb8d1c4b9e..b5bef4930cc6 100644 --- a/esphome/components/sensor/filter.cpp +++ b/esphome/components/sensor/filter.cpp @@ -1,8 +1,8 @@ #include "filter.h" +#include #include "esphome/core/hal.h" #include "esphome/core/log.h" #include "sensor.h" -#include namespace esphome { namespace sensor { @@ -376,9 +376,7 @@ void OrFilter::initialize(Sensor *parent, Filter *next) { // TimeoutFilter optional TimeoutFilter::new_value(float value) { this->set_timeout("timeout", this->time_period_, [this]() { this->output(this->value_); }); - this->output(value); - - return {}; + return value; } TimeoutFilter::TimeoutFilter(uint32_t time_period, float new_value) : time_period_(time_period), value_(new_value) {}