Frequently Asked Questions
What components are needed for this ESPHome water leak detector?
You’ll need a D1 mini board, a water leak probe, jumper wires, a USB power source, and a 100K resistor. These are readily available and make for a very affordable DIY project.
How do I connect the D1 mini to the leak probe?
Connect the probe to the D1 mini’s analog input (A0 pin) and ground. A 100K resistor is also required in the circuit, typically connected between the probe and the D1 mini’s 3.3V pin.
How sensitive is this water leak detector?
The sensitivity can be adjusted in the ESPHome configuration code. The provided example uses `return analog < 2.55;` which can be modified to change the detection threshold.
Can this ESPHome leak detector be integrated with Home Assistant?
Yes, once configured with ESPHome, the device will appear in Home Assistant, allowing you to create automations based on leak detection alerts.
I’ve been trying to make a simple water leakage detector to put under my kitchen sink. I came out with a pretty simple solution with a simple probe and a D1 mini.
Parts:
- 1 D1 mini board -Buy from AliExpress
- 1 Probe - Buy from AliExpress
- Some jumper wires
- USB power source
- 100K resistor
Schema:

(Notice that A0 is on the 7th pin and not the 8th like in the diagram)

Sensitivity can be altered by changing this value:
return analog < 2.55;



magnificent publish, very informative. I’m wondering why the other specialists of this sector don’t notice this. You must continue your writing. I am confident, you have a huge readers’ base already
Thanks mate
Hi, I am trying to do this with one of these https://www.aliexpress.com/item/32785475238.html so am going to pinch your lovely code for ESPHome. Hopefully it will work.
FYI – noticed your Schema diagram is a little confusing as you have A0 on the 8th pin of the diagram but it should be on the 7th pin as the 8th pin is RST.
Hey JD, you are right. It is a little bit confusing, but I hope others will notice the “A0” note on the pin. Thanks for stopping by!