Having discovered, when a wheel-cylinder sprang a leak, that this sensor/switch now fails to indicate near-total loss of fluid, I find that it's far from obvious how to remove it from the top of the 'Bendix'-marked header-tank on my '98/'99 Peugeot 306. (The warning-light does come on when the plug is removed from the sensor-head and the plug-contacts are bridged, i.e. the wiring, etc., is OK)
The externally-visible bit, with the socket, appears to be a single piece of quite soft/flexible brown plastic - I doubt that it could be bonded onto the hard polythene-like material of the tank, but there's no visible access to e.g. nuts/screws.
It can't simply screw in, 'cos the sideways-protruding socket wouldn't clear the tubular 'feature' of the tank-top onto which the filler-cap screws.
Maybe it's a 'bayonet'-type fitting, but
- it's *very* resistant to turning, even a little, in either direction
- I'm reluctant to apply more brute force while ignorant of how, if at all, it's supposed to come off ...