From 1d6d0d66dca39d1fedf7b2496da4e19835679a12 Mon Sep 17 00:00:00 2001 From: tomaszduda23 Date: Mon, 3 Mar 2025 22:08:42 +0100 Subject: [PATCH] [udp] fix clang tidy (#8351) --- esphome/components/udp/udp_component.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/esphome/components/udp/udp_component.h b/esphome/components/udp/udp_component.h index fb9b93e255..02f998ded7 100644 --- a/esphome/components/udp/udp_component.h +++ b/esphome/components/udp/udp_component.h @@ -70,7 +70,9 @@ class UDPComponent : public PollingComponent { } #endif void add_address(const char *addr) { this->addresses_.emplace_back(addr); } +#ifdef USE_NETWORK void set_listen_address(const char *listen_addr) { this->listen_address_ = network::IPAddress(listen_addr); } +#endif void set_port(uint16_t port) { this->port_ = port; } float get_setup_priority() const override { return setup_priority::AFTER_WIFI; } @@ -144,8 +146,9 @@ class UDPComponent : public PollingComponent { std::vector binary_sensors_{}; std::map> remote_binary_sensors_{}; #endif - +#ifdef USE_NETWORK optional listen_address_{}; +#endif std::map providers_{}; std::vector ping_header_{}; std::vector header_{};