How do you make Pulseaudio automatically switch to headset input when plugged in?

If the headset microphone is detected as unplugged Pulseaudio will trying to avoid connecting to a device that is not detected

I think @BG405 was on the right track about this

Apple earbuds use a different wiring standard compared to the jack socket on the laptop
I posted about this before - Headphone Microphone Not Detected

incorrect jack connections may be why the microphone is showing as unplugged, but it can be caused by other problems too
it is not difficult to obtain a headset adaptor to correct for a difference in wiring
but some Apple headsets have built-in remote control buttons and might not work even if the jack connection is corrected