Runaway Pancake has the right approach. Though the OP will never get there with the drawing he has. If you know the approximate CURRENT of the lamp, put a small resistor in series with the emitter of the transistor, then connect the emitter to an analog input. Size the resistor such that you have a few hundred millivolts going to the input. This is how it's done in automobiles. My BMW X3 got very upset when I changed turn signal bulbs to LEDs. It was looking for more current, or a higher voltage at the analog input. Since most light bulbs are running with one end grounded, it takes a bit more circuitry to sense at the "high end" but the principle is the same.