Rain drop sensor with digital gpio binary sensor not working

Hi,

I am trying to make a digital Rain drop sensor on D8 of a Wemos D1. This should be a digital in/out.
I attached a Rain drop sensor, which includes a LM393. I created the following code in esphome:

binary_sensor:
  - platform: gpio
    pin: 
      number: D8
    name: ${display_name} Rain
    device_class: moisture

But it is not working. I can turn the sensor on with the potentionmeter, led is on, but no log on the esphome output log and no change in HA.

Who has an idea?

Sounds like a wiring fault. How did you power and connect the sensor to the ESP?

Just simple. Vcc to 3,3v, ground to ground, and d0 of the lm393 to d8 of the wemos.

See here: perhaps rewire and recode for one of the pins labelled OK for input.

d8 is β€œ pulled to GND” according to link. Should I make a change in esphome? To e.g. INPUT_PULLDOWN?

No you should wire the sensor to

1 Like

Strange; testing on D5 is working now, i tested D7 and that is working not either. D5 is working so fine to me.