Automatic moisture detection