diff --git a/esphome/components/ethernet/ethernet_component_rp2040.cpp b/esphome/components/ethernet/ethernet_component_rp2040.cpp index c4f7aceac8e..f47f57cb326 100644 --- a/esphome/components/ethernet/ethernet_component_rp2040.cpp +++ b/esphome/components/ethernet/ethernet_component_rp2040.cpp @@ -180,6 +180,7 @@ void EthernetComponent::dump_config() { network::IPAddresses EthernetComponent::get_ip_addresses() { network::IPAddresses addresses; if (this->eth_ != nullptr) { + LwIPLock lock; addresses[0] = network::IPAddress(this->eth_->localIP()); } return addresses;