It looks like the cockpit door is open in your picture?
If it isn´t, then the camera position should govern it - we have to "fake" the cockpit door blocking the light because the lighting engine in X-plane does not allow solid structures blocking any light besides the sun (and even that not always).
So we "fake" the door blocking the light by checking wether the camera is in the cockpit AND the cockpit door is closed. If this is TRUE, we turn off the galley light (even though the switch is actually ON).
But if you move the camera out of the cockpit (like in your screenshot), the light goes back on and will illuminate the cockpit a little bit.