[adc] Fix ESP32-C2 ADC calibration to use line fitting (#13756)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Jonathan Swoboda
2026-02-04 11:44:17 +00:00
committed by GitHub
co-authored by Claude Opus 4.5
parent 5dc8bfe95e
commit ba18a8b3e3
3 changed files with 51 additions and 25 deletions
@@ -0,0 +1,12 @@
sensor:
- id: my_sensor
platform: adc
pin: GPIO1
name: ADC Test sensor
update_interval: "1:01"
attenuation: 2.5db
unit_of_measurement: "°C"
icon: "mdi:water-percent"
accuracy_decimals: 5
setup_priority: -100
force_update: true
@@ -0,0 +1,20 @@
esphome:
name: componenttestesp32c2idf
friendly_name: $component_name
esp32:
board: esp32-c2-devkitm-1
framework:
type: esp-idf
# Use custom partition table with larger app partition (3MB)
# Default IDF partitions only allow 1.75MB which is too small for grouped tests
partitions: ../partitions_testing.csv
logger:
level: VERY_VERBOSE
packages:
component_under_test: !include
file: $component_test_file
vars:
component_test_file: $component_test_file