Anyone successfully used this type of sensor with ESPHome? Two uses I have is 1, water leak detector and 2 rain guage…there may be better sensors for either, but this one seemed so cheap and basic but I’m not seeing anyone using it with ESPHome and I can’t even find a model number for it. Here’s a link to one on banggood.
thanks folks. @gencure – does the sensor report water/no water or how much water / depth of water / resistance level? (i.e. digital 1/0 or analog between 0 and x)?
I am using the Sensor with a D1 mini and with the above template. The Sensor is basically working but he shows continually a value of 6.6 ml without any water contact.
I expect 0 when no water is detected. After each intervall it shows a very short time 0 and switches then back to 6.6 ml
You probably need to set your filters to calibrate it. There will be a static voltage when there is no water present from humidity in the air etc. What I did to calibrate mine was get a 0 level, a full level, and a mid level inside the container.
Example:
If i have a 20ml container there will be a voltage reading at 0, 20, and 10 and the voltages should be between 0 an 1 v. Something like
filters:
- calibrate_linear:
# 0.1v = 0ml
# 1v = 1700ml
- 0.00098 -> 0.0 # empty
- 0.5523 -> 10.0 # half full or 10 mL of water
- 0.978 -> 20.0 # 20 ml -- full will be when the entire pad is covered