Can't identify a sensor near oil filter?

First post, of course it has to be something I know I broke.
I just bought a 1999 Honda CRV second hand, and while doing the first oil change I had to use a grip tool to remove the oil filter. When the filter finally let go the handle hit a wire and ripped it out. On the ground I found a small spring and a little cap that fits the top of the spring.
It looks like I I broke a sensor that is above and to the left of the oil filter maybe 4-6 inches from the filter.
No one at the shop I go to for parts has any idea what this part is. The car still drives fine. the only code that pulls is for the Transmission position sensor and that would be in the opposite direction.
I’m thinking it might be an oil pressure sensor, but the oil light isn’t on either.
Any ideas what I broke so I know what to replace? Lol

please post pictures of all the broken parts . . . both the parts that fell off, and what’s remaining on the engine

Touch the wire onto the engine block and see if the oil light comes on.

If it does, it’s oil light switch you broke.

Tester

My information shows the oil pressure switch nearby with an insulation covered YEL/RED wire going to it.
:evergreen_tree::slightly_smiling_face::evergreen_tree:
CSA

Thanks for the tips. I would have taken a picture but can barely get my hand in to it so getting a decent photo would be almost impossible.

Do you have a schematic you could share? I have been having a hard time locating a good one and the Chilton Manual isn’t super helpful in this case.

The oil pressure light won’t come on because you broke the switch. This is the cap and spring that fell out.

Don’t worry about a schematic. Just buy the oil pressure sensor and move on.

As Tester said; touch the wire to ground and see if the oil pressure light comes on then.

One last check: if you turn the ignition on but don’t start the engine, the oil light should come on.
If not then you know what you’ve broken.