Need help calculate lambda

Hello i use a resistance Sensor for measure Water Level.
Im not the math crack so i need help for calculate the correct level.
Here the Sensor :slight_smile:

  - platform: adc
    pin: A0
    name: "Filterteich Level"
    update_interval: 30s
    filters:
      - multiply: 3.3

My output like this :

[07:44:04][D][adc:056]: 'Filterteich Level': Got voltage=0.18V
[07:44:04][D][sensor:092]: 'Filterteich Level': Sending state 0.58975 V with 2 decimals of accuracy

So now my problem
I want to send 0% (empty) at 0,0 V and 100% full at 0,18 V to HA

Thank you for help

Greetings from Germany
Ingo

Add another filter to your sensor

filters:


  - calibrate_linear:
      - 0.0 -> 0.0
      - 0.18 -> 100.0

See https://esphome.io/components/sensor/index.html#sensor-filters

thanks for the quick repsonse

I set

  - platform: adc
    pin: A0
    name: "Filterteich Level"
    update_interval: 30s
    filters:
      - multiply: 3.3
      - calibrate_linear:
         - 0.0 -> 0.0
         - 0.18 -> 100.0

but now i’ve get

[08:11:37][D][adc:056]: 'Filterteich Level': Got voltage=0.18V
[08:11:37][D][sensor:092]: 'Filterteich Level': Sending state 327.63669 V with 2 decimals of accuracy

i think ive make a mistake ?

i Think i’ve got it

image

  - platform: adc
    pin: A0
    name: "Filterteich Level"
    update_interval: 30s
    unit_of_measurement: "%"
    accuracy_decimals: 0
    icon: "mdi:water-percent"
    filters:
      - calibrate_linear:
         - 0.0 -> 0.0
         - 0.18 -> 100.0

Thank you for the Help

1 Like

Gave up on the float switches?

no this is a pond
i need both

1 Like