Waiting on a Switch to Stop Moving

OR - Require some fixed number of identical readings before you respond. 3 to 5 might be a good place to start. If the switch is being turned the readings should be changing. When the position stabilizes then use that position. It is a sort of debounce that is looking for more than just 1 position.