Electronic moisture detection