He D3 as a diagnostic for the hard and soft X-rays from solar flares