Luup Programming - DSC alarm panel

Hoping I am posting in the correct spot here. I have the Vera3 installed with a DSC alarm panel and DSC alarm panel plugin. I have a scene in which 3 of my living room lights (device 5,6,7) turn off when arming in stay arm… works great on my way upstairs to bed. I also set up a scene that the living room motion turns on these lights when it detects motion. I am certain there is a way to add some lua programming in the Luup section of the scene control so that it will not activate the lights when armed in stay or away model. I can’t seem to find any info on how to write anything with the panel status. Any help would be appreciated!