How to use Poly Lock?

Hi,

Can someone help me?

I have set up poly-lock and poly-pad with my Vera Lite. I created a simple scene to do the lock and unlock it. However, if I activate the lock on the poly-pad when the poly-lock is already in the lock position, the lock will continue to turn into the lock direction and making a lot of kicking sound.

Can someone teach me how can I program the vira lite to avoid it?