@rayzurbock has a custom smartapp that uses a humidity sensor to track trends so it can guess whether someone is taking a shower. Might be of interest.
Bathroom Light Control
Initial Release: 1.0.1
Controls bathroom lights:
Turn on light when motion is detected.
Turn off light after x minutes of no motion detection
Extend light off timer to x minutes if humidity sensor is above the average for the room and trending upward (shower in use?)
Developed / Tested with Aeon Multisensor which by default sends humidity every 8 minutes. We need to detect that humidity is rising with 1 reading as most people will want this to kick in by the 8 minute period and not 2 polls which would be 16 minutes. To do so we calculate the average temp over a period of readings (4 by default), then if the humidity is higher than the average and higher than the last reading, it is determined that humidity level is trending upward, so we adjust the off timer to…