RE: sensor magnet
its not the attraction or repulsion.. the word you are looking for is "polarity".
one side of hall effect sensors will be triggered by a consistant polarity; either south or north. Flip the magnet and it wont get triggered - but flip the sensor also, it will trigger again.