Sensor to distinguish between daylight and artificial light in a room?
Methods off the top of my head:


Full spectrograph. As others have mentioned the profiles of various indoor lights will all be different than the sun.





Look for UV, the sun has a lot of UV. Indoor lights do not. That's the simplest difference between the sunlight and artificial light.
Monitor the brightness. It's hard to tell because your eyes rapidly adjust, but a sunny day outside is 5-50 times brighter than "bright" indoor lights. The downside to this is that an overcast day, and bright indoor lighting will begin to overlap. https://www.engineeringtoolbox.com/light-level-rooms-d_708.htmlhttps://www.engineeringtoolbox.com/light-level-rooms-d_708.html