diff --git a/esphome/components/ct_clamp/ct_clamp_sensor.cpp b/esphome/components/ct_clamp/ct_clamp_sensor.cpp index 674cc0ae98..c1e3bec486 100644 --- a/esphome/components/ct_clamp/ct_clamp_sensor.cpp +++ b/esphome/components/ct_clamp/ct_clamp_sensor.cpp @@ -64,6 +64,8 @@ void CTClampSensor::loop() { // Perform a single sample float value = this->source_->sample(); + if (isnan(value)) + return; if (this->is_calibrating_offset_) { this->sample_sum_ += value;