My sound is playing endlessly, what should I do?

You probably want it to play once when the color temperature exceeds 6000?
Just add a bool variable and change it to true when it happens, and to false when it falls back under 6000.