Two LEDs for driveway gate
You could use some passive components to power both LEDs with one output if it can supply enough current.

The circuit is assuming that the green LED is driven with a relay contact connected to 24V.  The 150 Ohm resistor needs to be a 5W power resistor and will get warm when the green LED in on.  When the Gate signal is low or the relay contact is open the power resistor will illuminate the red LED with minimal voltage drop causing barely discernible illumination in the green LED. The resistor values are calculated to give about 12mA LED current but this can be changed.  Use of Zenner diodes in series with the LEDs can reduce the power resistor dissipation as it does not have to clamp the voltage as much.

If the output contact is made to ground you would have to place the resistor in pull up arrangement.  If the output is driven high and low then you will not need the resistor.

Other arrangements are also possible depending on your device and how many wires you can afford to run to the LEDs (two is the minimum).  A datasheet for your controller would be useful information.







simulate this circuit &ndash; Schematic created using CircuitLab

EDIT:
For this to work with larger currents the resistor loading trick is not very practical as it needs to clamp below the glow voltage at the operating current of the other LED.  A simple SPDT relay is the correct and obvious solution. Select the contact rating to suit the load.







simulate this circuit