It's rather inefficient using wait for signal with wait n seconds. In your case, just remove signal action and make second event identical with previous event with 'doorstate' set differently. Your current event sheet just make it works once because the variable 'doorstate' wasn't reset to initial value. That's the problem
Switching between state can be easily done by utilizing toggle boolean.