dual-function moisture detection