diff --git a/esphome/components/syslog/esphome_syslog.h b/esphome/components/syslog/esphome_syslog.h index 3fa077b466..421a9bee73 100644 --- a/esphome/components/syslog/esphome_syslog.h +++ b/esphome/components/syslog/esphome_syslog.h @@ -5,6 +5,7 @@ #include "esphome/components/udp/udp_component.h" #include "esphome/components/time/real_time_clock.h" +#ifdef USE_NETWORK namespace esphome { namespace syslog { class Syslog : public Component, public Parented { @@ -23,3 +24,4 @@ class Syslog : public Component, public Parented { }; } // namespace syslog } // namespace esphome +#endif diff --git a/esphome/components/udp/automation.h b/esphome/components/udp/automation.h index 663daa1c15..f75e6d35bf 100644 --- a/esphome/components/udp/automation.h +++ b/esphome/components/udp/automation.h @@ -1,6 +1,7 @@ #pragma once #include "udp_component.h" +#ifdef USE_NETWORK #include "esphome/core/automation.h" #include @@ -36,3 +37,4 @@ template class UDPWriteAction : public Action, public Par } // namespace udp } // namespace esphome +#endif diff --git a/esphome/components/udp/packet_transport/udp_transport.h b/esphome/components/udp/packet_transport/udp_transport.h index 4a95a095cc..c87eb62780 100644 --- a/esphome/components/udp/packet_transport/udp_transport.h +++ b/esphome/components/udp/packet_transport/udp_transport.h @@ -1,6 +1,7 @@ #pragma once #include "../udp_component.h" +#ifdef USE_NETWORK #include "esphome/core/component.h" #include "esphome/components/packet_transport/packet_transport.h" #include @@ -24,3 +25,4 @@ class UDPTransport : public packet_transport::PacketTransport, public Parented