How to monitor a switch's state and do X if switch has remained in state B

Dane:
Hmmm - tried that - it didn't do the trick either. Thanks though!

I've done that in my code and it's worked, so it sounds like there is another issue with another part of your code, then.