Device for detecting water leaks