I'd try cleaning it first. Take off wheel, brake caliper, brake rotor. It's sitting behind the hub, reading the notches off a toothed ring. Sometimes metal shavings stick to it, since it's magnetic.
Did you check the wiring yet?
Of course, there's a good chance it's actually bad. Buy the part & install yourself???