From 6873f09f5722ff800f4e52dac3689e17dffe7927 Mon Sep 17 00:00:00 2001 From: Guillermo Ruffino Date: Wed, 8 Jul 2020 15:25:32 -0300 Subject: [PATCH] Fix ethernet logging too many warn messages (#1112) --- esphome/components/ethernet/ethernet_component.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/components/ethernet/ethernet_component.cpp b/esphome/components/ethernet/ethernet_component.cpp index d5548fc377..0553d66273 100644 --- a/esphome/components/ethernet/ethernet_component.cpp +++ b/esphome/components/ethernet/ethernet_component.cpp @@ -37,7 +37,7 @@ void EthernetComponent::setup() { } void EthernetComponent::loop() { const uint32_t now = millis(); - if (!this->connected_ && !this->last_connected_ && now - this->last_connected_ > 15000) { + if (!this->connected_ && !this->last_connected_ && now - this->connect_begin_ > 15000) { ESP_LOGW(TAG, "Connecting via ethernet failed! Re-connecting..."); this->start_connect_(); return;