diff --git a/esphome/components/runtime_stats/__init__.py b/esphome/components/runtime_stats/__init__.py index e70e010748..64382194ec 100644 --- a/esphome/components/runtime_stats/__init__.py +++ b/esphome/components/runtime_stats/__init__.py @@ -11,7 +11,7 @@ DEPENDENCIES = [] CONF_LOG_INTERVAL = "log_interval" runtime_stats_ns = cg.esphome_ns.namespace("runtime_stats") -RuntimeStatsCollector = runtime_stats_ns.class_("RuntimeStatsCollector", cg.Component) +RuntimeStatsCollector = runtime_stats_ns.class_("RuntimeStatsCollector") CONFIG_SCHEMA = cv.Schema( { diff --git a/esphome/components/runtime_stats/runtime_stats.cpp b/esphome/components/runtime_stats/runtime_stats.cpp index 72411ffd6f..75c59e77ba 100644 --- a/esphome/components/runtime_stats/runtime_stats.cpp +++ b/esphome/components/runtime_stats/runtime_stats.cpp @@ -1,4 +1,5 @@ #include "runtime_stats.h" +#include "esphome/core/defines.h" #ifdef USE_RUNTIME_STATS diff --git a/esphome/components/runtime_stats/runtime_stats.h b/esphome/components/runtime_stats/runtime_stats.h index 9ec4ec49a9..24dae46b2e 100644 --- a/esphome/components/runtime_stats/runtime_stats.h +++ b/esphome/components/runtime_stats/runtime_stats.h @@ -87,7 +87,7 @@ struct ComponentStatPair { } }; -class RuntimeStatsCollector : public Component { +class RuntimeStatsCollector { public: RuntimeStatsCollector();