diff --git a/esphome/components/runtime_stats/__init__.py b/esphome/components/runtime_stats/__init__.py index 64382194ec..e70e010748 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") +RuntimeStatsCollector = runtime_stats_ns.class_("RuntimeStatsCollector", cg.Component) CONFIG_SCHEMA = cv.Schema( { diff --git a/esphome/components/runtime_stats/runtime_stats.h b/esphome/components/runtime_stats/runtime_stats.h index 24dae46b2e..9ec4ec49a9 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 { +class RuntimeStatsCollector : public Component { public: RuntimeStatsCollector();