Here the Problem is the same.... Just the result is inverted !
If you press the Lighttest Button then ALL Led´s in Cockpit should light up.....
But in same kind like in the "Battery Off" Situation we got the same Problem..... With only ONE Config that reads the Status of Function (Offset) we just show the current state of this function.
In Example again the Gear ..... Lets talk now about the RED Lights for Gear in transit. If you on Ground at the gate and make the Lighttest like requested by Checklist then your Red Gear-Transit Led´s should light (like all other LED in your cockpit) BUT The Gear isn´t in transit at this moment.... So the Offset is still "0" and LED stay dark.
To make Lighttest Only the technic is the same like above..... Just with 2 little differences....
The Global Config NOW Read Lighttest Status instead of Battery Switch.
The Config 1 of your LED read again your function (Offset) and have Precondition " Only work when Lighttest is OFF (0)
The Config 2 (Same LED) NOW must have Value "1" to let the LED light up aslong lighttest is in progress. Like above you can use Transform "1" or Compare "If 1 Then 1 Else 1"
Important is that value is always 1 here..... And Precondition say " Only work when Lighttest is ON (1)
Result: Without Lighttest the LED show status of Function by Config 1 ..... When Lighttest get ON then Config 1 Stop working and Config 2 get allive and set the LED to ON aslong the Lighttest is in progress.
**********************
PROBLEM (advanced stuff) is when you like to build BOTH things sama time ..... Lighttest and Battery Off Situation !
Until now we use one "FAKE" Config that have a fixed Value ( 1 Lighttest or 0 Battery Off ) and another that simply read the real Offset Status of the function. But for both things there can more then 2 states happen.
Situation 1: Battery OFF - Function OFF - No Lighttest (LED must be OFF)
Situation 2 Battery OFF - Function OFF - Active Lighttest ( LED must be OFF)
Situation 3 Battery OFF - Function ON - No Lighttest (LED must be OFF)
Situation 4 Battery OFF - Funtion ON - Active Lighttest ( LED must be OFF)
Situation 5: Battery ON - Function OFF - No Lighttest (LED must be OFF)
Situation 6 Battery ON - Function OFF - Active Lighttest ( LED must be ON)
Situation 7 Battery ON - Function ON - No Lighttest (LED must be ON)
Situation 8 Battery ON - Funtion ON - Active Lighttest ( LED must be ON)
You see. This can not be done with only 2 Configs. To prevent us to make 8 Configs Finaly we use a little trick and make it with THREE Configs after all.
At first We need 2 Global Configs we can define the Lighttest Status and the Battery Status.
Then we need for EACH Function one Config that read the Status of the Function itself ( But this time we not use the LED here.... This is also just a "indicator"
Finaly we need 2 Configs for each Annunciator that controll our LED.
Now BOTH are "fake" Configs that not need a real Offset ( Thats why i said you can use 0000 ) Cause we compare both to be always the same Value.
Config 1 get transform "1" to be always ON ( Call it for exmple Gear Light ON)
Config 2 get transform "0" to be always OFF ( Call it Gear light OFF to get a tidy system and know what config is for)
The tricky part NOW is to build preconditions that include ALL 8 Sitautuons in a correct way. Also you must understand the Logic how Mobiflight (Expression Plug In for C++) handle the AND/ OR Parameters .
For the OFF Config you say.... Only work if Lighttest is off AND Function is off OR Battery is off
For the ON Config you say .... Only work if Lighttest is on OR funtion is on AND Battery is on
Not feel scarred.

... This is simple Math and Operator Logic. Think about then you understand the logic behind the code.
***********
Summary... Now the both Configs that controll LED have itself no direct indication to a Offset.... they ase Both just "Fake" Configs witha fixed Value BUT They work in case of Preconditions in exact the right situations.
And AGAIN: All this stuff is gone if we get the new tool ( realy hope Sebastian implement this within 2019. ) Then all is done in one Config .