I use an Aqara motion sensor. Just the basic v1 sensor with their stand to angle it down toward the occupant. It's in a corner near the door, situated to that only the person in the shower can see it.
Steam has had no effect on its life or performance in the 2 years it's been in use. I use HA with Home Assistant Device Bridge and its performance is consistently good. If you pair one of these directly to HE, then YMMV.
This turns on both the shower light, and the bathroom fan. This works so well because the sensor is tucked in a corner, so anyone using the bathroom for anything other than a shower does not trigger the shower lights or the fan. The sensor keeps the shower lights and fan active as long as there is motion. Once no motion is detected, the shower lights time out after 5 minutes, and the bathroom fan times out after 20 minutes. This works so much better than trying to trigger the fan via humidity.
The sensor is affixed to the tiled shower ceiling via the standard (and very sticky) Xiaomi double-sided adheisive that comes with the sensors. No sign of it loosening in even the slightest from the steam (and I have a teenager, so you know it gets mighty humid in there, for a very long period of time). I cleaned the tile with IPA first to ensure it wouldn't come loose.