It should work like that. If you want to test it out before you permanently mount the magnet, just tape it in place with some blue painters tape. If it gives you problems, try placing a 1/4" shim under the sensor to raise it up to the same level as the magnet.