@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.
@hyc I read that there are two types of detectors: optical (which I think is what I have) and heat detectors that simply react to changes in heat. Maybe that's what you have and it gets triggered just because the steam is hot. According to this theory, switching to an optical detector could help.
@eliasr the ones currently in my house are triggered by steam escaping the bathroom after a hot shower. Maybe the steam is condensing on the sensor, not really sure what the triggering mechanism is.