[zwave_proxy] Add missing USE_API guards for clang-tidy (#12590)

This commit is contained in:
J. Nick Koston
2025-12-20 10:40:43 -10:00
committed by GitHub
parent 6c2d255230
commit 644e806afd
2 changed files with 10 additions and 0 deletions

View File

@@ -1,4 +1,7 @@
#include "zwave_proxy.h"
#ifdef USE_API
#include "esphome/components/api/api_server.h"
#include "esphome/core/application.h"
#include "esphome/core/helpers.h"
@@ -344,3 +347,5 @@ bool ZWaveProxy::response_handler_() {
ZWaveProxy *global_zwave_proxy = nullptr; // NOLINT(cppcoreguidelines-avoid-non-const-global-variables)
} // namespace esphome::zwave_proxy
#endif // USE_API

View File

@@ -1,5 +1,8 @@
#pragma once
#include "esphome/core/defines.h"
#ifdef USE_API
#include "esphome/components/api/api_connection.h"
#include "esphome/components/api/api_pb2.h"
#include "esphome/core/component.h"
@@ -89,3 +92,5 @@ class ZWaveProxy : public uart::UARTDevice, public Component {
extern ZWaveProxy *global_zwave_proxy; // NOLINT(cppcoreguidelines-avoid-non-const-global-variables)
} // namespace esphome::zwave_proxy
#endif // USE_API