Did this with a contact sensor and a temp sensor:
Plan to try it try it on an Iris motion sensor over holidays.