diff --git a/esphome/components/nextion/nextion.h b/esphome/components/nextion/nextion.h index 2b0d6461db..17a17715f1 100644 --- a/esphome/components/nextion/nextion.h +++ b/esphome/components/nextion/nextion.h @@ -1237,14 +1237,14 @@ class Nextion : public NextionBase, public PollingComponent, public uart::UARTDe * * @param http_client A reference to the HTTP client object. The exact type of this object * depends on the platform: - * - Arduino: HttpClient type from the ArduinoHttpClient library. + * - Arduino: HTTPClient type from the ArduinoHttpClient library. * - ESP-IDF: esp_http_client_handle_t from the ESP HTTP Client library. * * @note Ensure that the HTTP client is initialized and not NULL before calling this function * to avoid runtime errors. */ #ifdef ARDUINO - void close_http_client_(HttpClient &http_client); + void close_http_client_(HTTPClient &http_client); #else // ESP-IDF void close_http_client_(esp_http_client_handle_t http_client); #endif // ARDUINO vs ESP-IDF diff --git a/esphome/components/nextion/nextion_upload.cpp b/esphome/components/nextion/nextion_upload.cpp index ba3aea607a..40b8aea231 100644 --- a/esphome/components/nextion/nextion_upload.cpp +++ b/esphome/components/nextion/nextion_upload.cpp @@ -317,7 +317,7 @@ bool Nextion::upload_tft(uint32_t baud_rate, bool exit_reparse) { } #ifdef ARDUINO - std::string content_range_string = http_client.header("Content-Range"); + String content_range_string = http_client.header("Content-Range"); content_range_string.remove(0, 12); this->tft_size_ = content_range_string.toInt(); #else // ESP-IDF @@ -424,7 +424,7 @@ bool Nextion::upload_tft(uint32_t baud_rate, bool exit_reparse) { } #ifdef ARDUINO -void Nextion::close_http_client_(HttpClient &http_client) { +void Nextion::close_http_client_(HTTPClient &http_client) { ESP_LOGD(TAG, "Close HTTP connection"); http_client.end(); ESP_LOGV(TAG, "Connection closed");