Use ADC sampling

Use esphome/esphome#6330 to enable sampling on adc sensor and smooth the data.
Solves #1918
This commit is contained in:
Edward Firmo
2024-03-17 22:07:48 +01:00
parent 16b5ce4b0b
commit 271362511f

View File

@@ -36,7 +36,14 @@ external_components:
url: https://github.com/edwardtfn/esphome
ref: nextion-23 # To do: nextion-v425
components:
- nextion # Change this when that PR#6192 gets released (2024.3?)
- nextion # Change this when that PR#6192 gets released (2024.4?)
refresh: 300s
- source:
type: git
url: https://github.com/edwardtfn/esphome
ref: adc-sampling
components:
- adc # Change this when PR#6330 is merged (2024.4?)
refresh: 300s
##### ESPHOME CONFIGURATION #####
@@ -1434,6 +1441,7 @@ sensor:
pin: 38
update_interval: 60s
attenuation: 11db
samples: 12
##### INTERNAL TEMPERATURE SENSOR, adc reading converted to resistance (calculation)#####
- id: resistance_sensor