@hyc from my experience at home it seems they can distinguish them, it never started beeping from the bathroom or from boiling lots of water in the kitchen. But it does beep when a frying pan is left for too long on the stove (real smoke) which happened a few times.
I think it's because the thing detects smoke particles, which are much larger than water molecules.