From 77e98d15fb8277538301c5b111858fb403da74a9 Mon Sep 17 00:00:00 2001 From: Edward Firmo <94725493+edwardtfn@users.noreply.github.com> Date: Wed, 11 Dec 2024 23:55:30 +0100 Subject: [PATCH] Initialize default_vref to 1100mV To keep consistency with v4 and avoid another warning on ESP32 standard. --- esphome/components/adc/adc_sensor_esp32_v5.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/esphome/components/adc/adc_sensor_esp32_v5.cpp b/esphome/components/adc/adc_sensor_esp32_v5.cpp index d963779a41..042b1b2edf 100644 --- a/esphome/components/adc/adc_sensor_esp32_v5.cpp +++ b/esphome/components/adc/adc_sensor_esp32_v5.cpp @@ -77,6 +77,9 @@ void ADCSensor::setup() { .unit_id = unit_id, .atten = this->attenuation_, .bitwidth = ADC_BITWIDTH_DEFAULT, +#if !defined(USE_ESP32_VARIANT_ESP32S2) + .default_vref = 1100, // Initialize default_vref to 1100mV +#endif // not USE_ESP32_VARIANT_ESP32S2 }; if (adc_cali_create_scheme_line_fitting(&cali_config, &handle) == ESP_OK) { this->calibration_handle_ = handle;