The sensor in my optical smoke detector seems to have no vent to let the smoke in! But it does work - I tested it with actual smoke.
The reason I have it open is the f****ng thing keeps sounding for no reason. It's perfectly clean inside, the room is not dusty, and I've tried a few brand new batteries.