Trigger a scene from a device. trigger a diffrerent scene when the status revert

Hi Guys,

Does anyone know if you can trigger a scene with a device class change and then trigger another scene when the device class changes back?

I have bought a simple z-wave door contact that i want to make work in the following way, when the door contact is open it switches on the lights… easy enough I have done that bit, how do you make the lights go off when you close the door???

I have tried creating two scene’s with opposing functions but i can’t get the settings to work… do i really need two door contacts?

The device I have is the Everspring SM103. please help