After a water heater leak I just made my own. I run my HA on a Raspberry Pi, so I connected the GPIO pins to a current-limiting resistor and some wires that I put in the drip pan of my water heater. I made the two contacts using a screw connector, and hot glued it in the pan. You can also do this with an ESP chip. Additionally, I integrated my smoke detectors through an optoisolator and connected all my hard-wired door and window sensors to the GPIO. It's been working great this way for me.
homeassistant
Home Assistant is open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiasts. Perfect to run on a Raspberry Pi or a local server. Available for free at home-assistant.io
an esp8266 (or esp32 if you have on laying around) and a long wire. cut that in half, remove the insulation from the ends, wire one to ground and one to any output pin on the esp. detect when the pin gets shorted (basically a button activated by water). use esphome and the button input.
If you have a zigbee network the aqara leak detector is a good option. It doesn't require a hub, cloud or any setup. And if you are willing to wait you can get them on AliExpress for a lot cheaper than Amazon.
I have a few of the Aqara leak detectors and they have worked well.
They also have screw terminals that you can attach wires onto to extend the detection area/range. I’ve also seen people attach contact or pressure sensors to them, they are nifty devices.