Sonoff TH + reed magnetic open close sensor

Does anyone know if you can add a reed magnetic switch to any of the sonoff th devices. Trying to build a sensor would be nice If I could have one device to monitor Temps and open close states of the door.