From ea6a7a22ff451d164285b92574d4dd846f37d111 Mon Sep 17 00:00:00 2001 From: Paul Monigatti Date: Thu, 23 Sep 2021 20:45:41 +1200 Subject: [PATCH] Fix ESP8266 ADC (#2376) --- esphome/components/adc/adc_sensor.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/esphome/components/adc/adc_sensor.cpp b/esphome/components/adc/adc_sensor.cpp index 9a05c1d66b..c8f8b0e0f6 100644 --- a/esphome/components/adc/adc_sensor.cpp +++ b/esphome/components/adc/adc_sensor.cpp @@ -1,9 +1,13 @@ #include "adc_sensor.h" #include "esphome/core/log.h" +#ifdef USE_ESP8266 #ifdef USE_ADC_SENSOR_VCC #include ADC_MODE(ADC_VCC) +#else +#include +#endif #endif namespace esphome {