From dc6574d827190c29173ff40fb8e204e68ad8e637 Mon Sep 17 00:00:00 2001 From: White Red Date: Tue, 27 Aug 2024 00:34:14 +0300 Subject: [PATCH] checking macro to include/exclude lock component should fix #15 --- components/homekit/HAPAccessory.h | 1 + components/homekit/lock.cpp | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/components/homekit/HAPAccessory.h b/components/homekit/HAPAccessory.h index 4de8041..229f1a1 100644 --- a/components/homekit/HAPAccessory.h +++ b/components/homekit/HAPAccessory.h @@ -1,5 +1,6 @@ #pragma once #include +#include #include #include #include "const.h" diff --git a/components/homekit/lock.cpp b/components/homekit/lock.cpp index aacc020..5baf674 100644 --- a/components/homekit/lock.cpp +++ b/components/homekit/lock.cpp @@ -1,3 +1,5 @@ +#include +#ifdef USE_LOCK #include "lock.h" namespace esphome @@ -353,4 +355,5 @@ namespace esphome ESP_LOGI(TAG, "Lock '%s' linked to HomeKit", accessory_name.c_str()); } } -} \ No newline at end of file +} +#endif \ No newline at end of file