I have very similar logic in a gauge that I wrote that does something very similar, but it works off the smokesystem rather than the cabin lights. This turns the smokesystem on if three targets are met:
(A:RADIO HEIGHT,feet) 100 > if{ (>K:SMOKE_ON) } els{ (>K:SMOKE_OFF) } (A:INDICATED ALTITUDE,feet) 9000 < if{ (>K:SMOKE_ON) } els{ (>K:SMOKE_OFF) } (A:KOHLSMAN SETTING MB,millibars) 1014 < if{ (>K:SMOKE_ON) } els{ (>K:SMOKE_OFF) } (A:TOTAL AIR TEMPERATURE,farenheit) 40 < if{ (>K:SMOKE_ON) } els{ (>K:SMOKE_OFF) }
I have 'if' amd 'els' arguments, whereas yours have no 'els' arguments. Another difference is that my gauge uses A variables with numerical values as switches. I haven't had much luck either with boolean logic.
Let us know how you get on.
