diff --git a/esphome/components/mqtt/mqtt_backend.h b/esphome/components/mqtt/mqtt_backend.h index d23cda578d..3962c40a42 100644 --- a/esphome/components/mqtt/mqtt_backend.h +++ b/esphome/components/mqtt/mqtt_backend.h @@ -1,5 +1,6 @@ #pragma once - +#include "esphome/core/defines.h" +#ifdef USE_MQTT #include #include #include "esphome/components/network/ip_address.h" @@ -67,3 +68,4 @@ class MQTTBackend { } // namespace mqtt } // namespace esphome +#endif diff --git a/script/clang-tidy b/script/clang-tidy index 0ffaa32b96..18dbfb2b34 100755 --- a/script/clang-tidy +++ b/script/clang-tidy @@ -258,14 +258,12 @@ def main(): "fingerprint_grow", "md5", "mlx90393", - "mqtt", "online_image", "sgp4x", "wireguard", "tuya", "status", "nextion", - "mqtt", "improv_base", "http_request", "ota",