Smoke and carbon monoxide detector