Hi. Thanks for the info. I will need 2 programs, I thought there may be a way to do it with one and I wasn't smart enough to figure it out. I ended up triggering (closing) a phantom ELK output with the wait command when the door opens, then an additional program that turns off the lights when the state of the phantom relay opens.
Thanks again for your help.