Default Is there anyway to disable and re-enable Knock Code based on set conditions?

I want to be able to disable lock screen security based on certain conditions. Right now, I'm using Llama and the "change screen lock password" function. That can disable whatever lock screen security I have, but only re-enable PIN security. Any way to turn knock code off, then set it it to turn back on automatically?

Sent from my LG-D851 using Tapatalk