Linking object's visibility to a bone's location / animating visibility in Action?

I have a character with several actions set up and another object that is parented to one of the characters bones.

What I’d like to do is to turn this other object’s visibility off and on, based on the location of another bone (which I’d use as a simple slider). The object only needs to be able to switch between visible and invisible.

I’m aware I could simply animate the object’s layer, but I’ve found no way to do this within the Action, so I’m thinking the slider approach might work here. However I don’t see a good way of linking visibility to the slider’s position.

I could probably do this with Python (via material nodes or Script constraints?), but I haven’t done any Python programming in two years, so this would take me at least half a day. Any other solutions?