Magnetic sensor largest range

That makes even less sense.

"Stops performing" You never told us what was started.

"The buttons" What buttons?

It almost seems like you want to identify the magnets. Like the sensor can see some identifying marks on the magnets. Magnets only have N and S. There is no way to identify a permanent magnet from its magnetism.