So I have 2 values from esphome.
Pulse_width using lambda to correct the value displays ok in graph card, but adc using calibration filter displays raw voltage level in graph instead of calibrated value.
Entities card displays both values in ppm as expected.
Any suggestions how to set up so that graph card shows both in ppm? Or should I use lambda expression for adc also.
- platform: adc
pin: 34 #<----------------pin
name: "CO2_analog"
unit_of_measurement: ppm
update_interval: 5s
filters:
- calibrate_linear:
# Point 1 -> 0.4V (from sensor) to 0.0 ppm (true value)
# Point 2 -> 2.0V (from sensor) to 5000.0 ppm (true value)
- 0.4 -> 0.0
- 2.0 -> 5000
- platform: pulse_width
pin: 18 #<----------------pin
name: "co2_pulse"
unit_of_measurement: ppm
update_interval: 5s
filters:
- lambda: return x*5000-10;