From 92a24d52be5ee60772c10554967a0d011e7ca723 Mon Sep 17 00:00:00 2001 From: Maurice Makaay Date: Tue, 21 Sep 2021 17:11:58 +0200 Subject: [PATCH] Fix OTA password mismatch error. (#2363) Co-authored-by: Maurice Makaay --- esphome/components/ota/ota_component.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/components/ota/ota_component.cpp b/esphome/components/ota/ota_component.cpp index f217bd32d1..5e07bb64e7 100644 --- a/esphome/components/ota/ota_component.cpp +++ b/esphome/components/ota/ota_component.cpp @@ -325,7 +325,7 @@ void OTAComponent::handle_() { ESP_LOGV(TAG, "Auth: Result is %s", sbuf); // Receive result, 32 bytes hex MD5 - if (!this->writeall_(buf + 64, 32)) { + if (!this->readall_(buf + 64, 32)) { ESP_LOGW(TAG, "Auth: Reading response failed!"); goto error; }