diff --git a/esphome/components/ethernet/ethernet_component.cpp b/esphome/components/ethernet/ethernet_component.cpp index 8eb4718f49..447c5b8075 100644 --- a/esphome/components/ethernet/ethernet_component.cpp +++ b/esphome/components/ethernet/ethernet_component.cpp @@ -276,7 +276,7 @@ void EthernetComponent::start_connect_() { #endif dns_setserver(0, &d); } - if (uint32_t(this->manual_ip_->dns1) != 0) { + if (uint32_t(this->manual_ip_->dns2) != 0) { ip_addr_t d; #if LWIP_IPV6 d.type = IPADDR_TYPE_V4;