[code-quality] fix clang-tidy wifi related

This commit is contained in:
Tomasz Duda 2024-08-12 16:49:40 +02:00
parent f13cf1f7a0
commit 8cd459d8e8
3 changed files with 7 additions and 2 deletions

View file

@ -1,9 +1,10 @@
#pragma once
#include "esphome/core/defines.h"
#ifdef USE_WIFI
#include "esphome/components/network/ip_address.h"
#include "esphome/core/automation.h"
#include "esphome/core/component.h"
#include "esphome/core/defines.h"
#include "esphome/core/helpers.h"
#include <string>
@ -442,3 +443,4 @@ template<typename... Ts> class WiFiDisableAction : public Action<Ts...> {
} // namespace wifi
} // namespace esphome
#endif

View file

@ -3,6 +3,7 @@
#include "esphome/core/component.h"
#include "esphome/components/text_sensor/text_sensor.h"
#include "esphome/components/wifi/wifi_component.h"
#ifdef USE_WIFI
#include <array>
namespace esphome {
@ -131,3 +132,4 @@ class MacAddressWifiInfo : public Component, public text_sensor::TextSensor {
} // namespace wifi_info
} // namespace esphome
#endif

View file

@ -4,7 +4,7 @@
#include "esphome/core/helpers.h"
#include "esphome/components/sensor/sensor.h"
#include "esphome/components/wifi/wifi_component.h"
#ifdef USE_WIFI
namespace esphome {
namespace wifi_signal {
@ -19,3 +19,4 @@ class WiFiSignalSensor : public sensor::Sensor, public PollingComponent {
} // namespace wifi_signal
} // namespace esphome
#endif