Problems with runIn

I have this working for a button, not a switch. I’m not sure that it can work with a switch. The button I’m using is based on the device type from the “Easy Button” project mentioned here: Easy Button (@bdahlem - great project idea by the way, although I didn’t use the Easy Button, I did make my own similar button based on it) using the same door/window sensor Brian mentions in that project - http://www.monoprice.com/Product?c_id=122&cp_id=12212&cs_id=1221201&p_id=10795&seq=1&format=2