Enter the era when every website wants camera permissions ...
Or maybe there is some other sensor you could use? Like if photoelectric effect triggered some noise in your microphone or slightly more TCP retransmissions some such
Most devices have a built-in ambient light sensor:
What do you mean "most"? Maybe the phones, but PCs rarely have them. Outside macbooks, I only have seen one PC with a light sensor.
I meant most mobile devices. I think my TV has one as well.
Currently, the switch from light to dark (or vice versa) is very disruptive. Imagine switching every few minutes just because some clouds pass by, to me that sounds terrible.