Sensor for when LED is On (not with a photosensor)

I’ve added an esp8266 to my 3 way HDMI switch so that it bridges the physical switch - when I use my defined virtual switch through HA, it simulates the button press and changes the HDMI input. Which is cool.

Whichever of the three HDMI inputs is active has an illuminated LED. How can I configure it so that my esp can also report back which input is currently live? I thought I could get away with setting up a binary sensor, connecting ground to one side of the LED and a pin to another, but that didnt work.

Any advice would be appreciated - please bear in mind I’m a total idiot with electronics and anything that does work is more due to luck than design (or copying other people).

Got a schematic or a photo?

Connecting across the LED should work. You may have to connect across the LED current limiting resistor and LED if the HDMI switch runs on 3.3V logic. If it runs on 5V logic do not do this.

It wont work if the LED is being driven with an open collector output.