From db750fa53ba6cca8faec0aa589bae210793ccb3c Mon Sep 17 00:00:00 2001 From: Tomasz Duda Date: Sat, 11 May 2024 08:48:18 +0200 Subject: [PATCH] fix debug component --- esphome/components/debug/__init__.py | 4 +++- esphome/core/helpers.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/esphome/components/debug/__init__.py b/esphome/components/debug/__init__.py index 4a48effa1e..05920e79d5 100644 --- a/esphome/components/debug/__init__.py +++ b/esphome/components/debug/__init__.py @@ -1,5 +1,6 @@ import esphome.codegen as cg import esphome.config_validation as cv +from esphome.core import CORE from esphome.const import ( CONF_BLOCK, CONF_DEVICE, @@ -45,6 +46,7 @@ CONFIG_SCHEMA = cv.All( async def to_code(config): - zephyr_add_prj_conf("HWINFO", True) + if CORE.using_zephyr: + zephyr_add_prj_conf("HWINFO", True) var = cg.new_Pvariable(config[CONF_ID]) await cg.register_component(var, config) diff --git a/esphome/core/helpers.h b/esphome/core/helpers.h index bac3803491..402047dca7 100644 --- a/esphome/core/helpers.h +++ b/esphome/core/helpers.h @@ -8,6 +8,7 @@ #include #include #include +#include #include "esphome/core/optional.h"