Apple Shortcuts - switch off lights when door is locked

I was wondering - is it possible when the door is locked (obviously nobody at home anymore) that all lights get switched off? I can control my lights with shortcuts, but only by starting a shortcut manually.

Now could a „status change“ trigger switching off the light? Shortcuts has the options of „lock mechanism target state“ and „lock mechanism current state“. But whatever I try, the lights stay on. Maybe Shortcuts can not be triggered by an external event like locking the door?

Any ideas?
Thanks!