I believe this is what you want.
You have a mercury switch like the one in my garage thermostat, right? Glass vial of mercury, two wires. You have 24v source and led light, right? Two wires go from supply to led light. Cut one wire, insert switch. When switch is upright, mercury is across it's leads, switch is closed, led lights. Switch tilted mercury flows away from it's leads, switch is open, led light is off.
Simple.
Bear in mind, those mercury switches are low current, my guess 500mA (1/2A) max.
So be sure led light isn't much current draw otherwise you will need a relay, 24v coil, contacts over current draw of light.
A bracket? That's the easy part! Just "mount" switch to door temporarily with tape. Use ohm meter. Tape how you want it to operate. Light on (switch closed, about zero ohms)...open door, switch open, infinity resistance). Once you get it way you want, make a bracket mounting switch that way. Of course you have to consider how/where the two wires will be so door works, wires don't get pinched or interfere with door movement.
Hope this helps...



Sent from my SM-S320VL using Tapatalk