Use Motion Eye camera as light intesity sensor in home assistant?

The device on which Home Assistant is installed is in a room in which I want to know if the lights are on or not. These lights are not smart (yet), so there is no way of me knowing their state directly.

The computer does have a webcam that I can access through motion eye!

Is there a way in which I can use the camera as a sensor that measures the amount of light in the room?

A camera is a bit overkill for something such as light intensity, but there are no extra costs for me.