mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-30 06:33:51 +00:00 
			
		
		
		
	[code-quality] fix clang-tidy mqtt (#7253)
This commit is contained in:
		| @@ -1,5 +1,6 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include "esphome/core/defines.h" | ||||
| #ifdef USE_MQTT | ||||
| #include <string> | ||||
| #include <map> | ||||
| #include "esphome/components/network/ip_address.h" | ||||
| @@ -67,3 +68,4 @@ class MQTTBackend { | ||||
|  | ||||
| }  // namespace mqtt | ||||
| }  // namespace esphome | ||||
| #endif | ||||
|   | ||||
| @@ -1,7 +1,9 @@ | ||||
| #include "mqtt_backend_esp32.h" | ||||
|  | ||||
| #ifdef USE_MQTT | ||||
| #ifdef USE_ESP32 | ||||
|  | ||||
| #include <string> | ||||
| #include "mqtt_backend_esp32.h" | ||||
| #include "esphome/core/log.h" | ||||
| #include "esphome/core/helpers.h" | ||||
|  | ||||
| @@ -189,3 +191,4 @@ void MQTTBackendESP32::mqtt_event_handler(void *handler_args, esp_event_base_t b | ||||
| }  // namespace mqtt | ||||
| }  // namespace esphome | ||||
| #endif  // USE_ESP32 | ||||
| #endif | ||||
|   | ||||
| @@ -1,5 +1,7 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include "mqtt_backend.h" | ||||
| #ifdef USE_MQTT | ||||
| #ifdef USE_ESP32 | ||||
|  | ||||
| #include <string> | ||||
| @@ -7,7 +9,6 @@ | ||||
| #include <mqtt_client.h> | ||||
| #include "esphome/components/network/ip_address.h" | ||||
| #include "esphome/core/helpers.h" | ||||
| #include "mqtt_backend.h" | ||||
|  | ||||
| namespace esphome { | ||||
| namespace mqtt { | ||||
| @@ -174,3 +175,4 @@ class MQTTBackendESP32 final : public MQTTBackend { | ||||
| }  // namespace esphome | ||||
|  | ||||
| #endif | ||||
| #endif | ||||
|   | ||||
| @@ -1,8 +1,9 @@ | ||||
| #pragma once | ||||
| #include "mqtt_backend.h" | ||||
|  | ||||
| #ifdef USE_MQTT | ||||
| #ifdef USE_ESP8266 | ||||
|  | ||||
| #include "mqtt_backend.h" | ||||
| #include <AsyncMqttClient.h> | ||||
|  | ||||
| namespace esphome { | ||||
| @@ -70,3 +71,4 @@ class MQTTBackendESP8266 final : public MQTTBackend { | ||||
| }  // namespace esphome | ||||
|  | ||||
| #endif  // defined(USE_ESP8266) | ||||
| #endif | ||||
|   | ||||
| @@ -1,8 +1,9 @@ | ||||
| #pragma once | ||||
| #include "mqtt_backend.h" | ||||
|  | ||||
| #ifdef USE_MQTT | ||||
| #ifdef USE_LIBRETINY | ||||
|  | ||||
| #include "mqtt_backend.h" | ||||
| #include <AsyncMqttClient.h> | ||||
|  | ||||
| namespace esphome { | ||||
| @@ -70,3 +71,4 @@ class MQTTBackendLibreTiny final : public MQTTBackend { | ||||
| }  // namespace esphome | ||||
|  | ||||
| #endif  // defined(USE_LIBRETINY) | ||||
| #endif | ||||
|   | ||||
		Reference in New Issue
	
	Block a user