IngoNRW
(Ingo)
May 20, 2020, 5:52am
1
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
- 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
nickrout
(Nick Rout)
May 20, 2020, 5:58am
2
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
IngoNRW
(Ingo)
May 20, 2020, 6:13am
3
nickrout:
calibrate_linear: - 0.0 → 0.0 - 0.18 → 100.0
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 ?
IngoNRW
(Ingo)
May 20, 2020, 6:36am
4
i Think i’ve got it
- 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
tom_l
May 20, 2020, 8:23am
5
Gave up on the float switches?
IngoNRW
(Ingo)
May 20, 2020, 10:02am
6
no this is a pond
i need both
1 Like