so i have made several boxes to detect floor if it floods using esp32 mini d1s
all it is is gpio to ground 2 wires to 2 screws in a container and when water touchs the screws makes contact just like those peep easter chickens u wet your finger and touch the 2 contacts
well when i do it the sensor on couple dont work or they go on off on off on off
i tried delayed ms up to 250 but then doesnt work and if i need a resistor i not sure what size i need
but here is the code that i use on all my water floor sensors
binary_sensor:
- platform: gpio
pin:
number: GPIO16 #GPIO13
mode:
input: true
pullup: true
name: "(Well Pump)"
on_state:
then:
- switch.turn_on: Siren
filters:
- delayed_on: 10ms # Prevents short spikes from triggering
- invert:
so this particiular water sensor sits by my well pump so if there is any leaks on the floor it will let me know