This could be a dumb question. When I thought about it couldn't figure it out that's why I am asking

Arent there new Light sensors which are kept inside the room which detects the intensity of sunlight and adjust room's lighting intensity according to sunlight intensity??
How does this system work? like suppose intensity of sunlight is less and sensor detects less light and say the system increases the intensity of the room lights to compensate it. So once the room lights kick in to full intensity, wouldn't the Light sensor detect this light and try to decrease the intensity of light to reduce power and try to turn it off? Wouldnt this go on like a loop? and the room light would never turn on right?
As I said earlier could be a dumb question

but its driving me nuts...