Tri State/Floating Signal Detection
While waiting for clarification to my comment in your original post, is this what you want?







simulate this circuit &ndash; Schematic created using CircuitLab

Figure 1. Connect the two opto-LEDs back to back.

How it works:


In the tri-stated condition neither conducts. About 6 mA flows continuously through R1 and R2.
When SW1 is pressed 12 mA flows through D1 and R2. (With 1.5 V across D1 a further 1.5 mA will flow through R1.) D2 is reverse biased but with only 1.5 V across it no damage will result.
With SW2 closed the situation is reversed and 12 mA flows through R1 and D2.


It uses the same number and values of components as your original design.