1968 Honda CT90 spring/valve?

I have a 1968 CT90, I noticed the other day that there's a component that is like a valve or something, it is just outside of the battery compartment, I looks like a small black cylinder with a a coil spring hooked through a rod in the middle of it. When I pull in the spring the rod in the middle moves, and then returns to where it was when I let go so it is supposed to move, however the spring isn't attached to anything, it's just dangling there. What is this piece and where does the spring attach to?

Sounds like the switch for the brake light. Should be connected to the brake linkage.

Cool, thanks! I was wondering as there wasn't much else that it could possibly connect to.