diff --git a/esphome/components/runtime_stats/runtime_stats.cpp b/esphome/components/runtime_stats/runtime_stats.cpp index 96a222da84..72411ffd6f 100644 --- a/esphome/components/runtime_stats/runtime_stats.cpp +++ b/esphome/components/runtime_stats/runtime_stats.cpp @@ -9,9 +9,6 @@ namespace esphome { namespace runtime_stats { -// Forward declaration to help compiler -class RuntimeStatsCollector; - RuntimeStatsCollector::RuntimeStatsCollector() : log_interval_(60000), next_log_time_(0) { global_runtime_stats = this; } diff --git a/esphome/components/runtime_stats/runtime_stats.h b/esphome/components/runtime_stats/runtime_stats.h index de241e439c..7e763810eb 100644 --- a/esphome/components/runtime_stats/runtime_stats.h +++ b/esphome/components/runtime_stats/runtime_stats.h @@ -11,11 +11,10 @@ #include #include "esphome/core/helpers.h" #include "esphome/core/log.h" +#include "esphome/core/component.h" namespace esphome { -class Component; // Forward declaration - namespace runtime_stats { static const char *const TAG = "runtime_stats";