From 57d70e5516188bb0910ac97a6327035bf3e5e835 Mon Sep 17 00:00:00 2001 From: kenji Date: Wed, 23 Jul 2025 08:11:08 -0400 Subject: [PATCH] fix component API include compile error --- components/hauslane/hauslane.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/components/hauslane/hauslane.cpp b/components/hauslane/hauslane.cpp index 6f44562..5c7bb94 100644 --- a/components/hauslane/hauslane.cpp +++ b/components/hauslane/hauslane.cpp @@ -1,6 +1,10 @@ #include "esphome/core/log.h" #include "hauslane.h" +#if defined(USE_API) +#include "esphome/components/api/custom_api_device.h" +#endif + namespace esphome { namespace hauslane { @@ -30,7 +34,9 @@ void Hauslane::setup() { } // register ESPHome API service named "command" +#if defined(USE_API) register_service(&Hauslane::command, "command", {"command"}); +#endif } void Hauslane::loop() {