Lighting either of two LEDs, or none, based on digital input
simulate this circuit &ndash; Schematic created using CircuitLab

Figure 1. Current shunting the LEDs.

Rather than trying to switch the LEDs on under certain conditions it may be easier to switch the off by shunting the current around them. Can someone do a sanity check on this design?

How it works.


With SW1 high as shown, Q2 is biased off and Q1 is biased on shorting out D1. D2 will light.
With SW1 toggled, Q2 is biased on, shorting out D2, and Q1 biased off allowing D1 to light.
With SW in mid-position (disconnected) current will flow Q2e-b - R1 - R2 - Q1b-e, bias both transistors on and shunt both LEDs.
Current through R3 will be almost constant in the three states. With an LED on it will be \$ \frac {22}{470} = 47~\mathrm mA \$ rising slightly to \$ \frac {24}{470} = 51~\mathrm mA \$ when both LEDs are shunted.



  The solution that does this with the smallest amount of discrete components will be approved.


Component count: 5 + the two LEDs.