Detecting 24V garage door light is on

I want to detect if the light in the garage door opener is On or Off. It is 24V DC. What do I need to do to detect this in a 3.3V ESP2866?

What kind of light? You mean an LED?
Then is not 24 volts.

Yes I have replaced the existing globes with LED, but yes they are 24V, I had to find equivalent LED to fit, that is not the issue. I just want to detect if it is on or off.

OK…
Use an LDR. Light dependent resistor.

It will change the resistor value depending on how much light hits it. Generally lower with more light.
Then you add another resistor in series to build a voltage divider, you need to experiment with a multimeter and different size resistors until you get a 2.8-3.3 volt value when the light is on and less when light is off.

Or something like this.

Thanks. I bought a 24V DC relay and will use that to pull a GPIO line down or up