The boiler lit and ran the other day, but now the pilot light was out. I could hear a hum at the control. I lit the pilot light, but when I no longer pressed on the valve, the pilot light went out right away. Is it a dirty sensor? What can I do to find out what is wrong?
Most pilot light devices have a sensor that detects that the pilot light is lit, and will shut off the pilot gas if it doesn't detect the lit flame.
This sensor must heat up in order to detect the flame, so after you light your pilot light, keep the pilot valve depressed for 30 seconds in order to ensure the sensor heats up. After 30 seconds, release the valve. If the light still goes off, repeat 1 or 2 more times.
Once the light stays lit, turn the valve to the ON or OPEN position and the pilot light will stay lit.
If the light refuses to stay lit even after several minutes of hot flame hitting it, then yes, you may have a defective sensor or other part.