All you need is an ESP32 board and some tinkering with ESPHome.
Two burst water pipes and two home floods later, I'm confident that this water leak sensor will help minimise any future ...