<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_color_temp(self, color_temp, *, index=0, transition_time=None):
 """Set color temp a light."""

        self._value_validate(color_temp, RANGE_MIREDS, "Color temperature")

        values = {
            ATTR_LIGHT_MIREDS: color_temp
        }

        if transition_time is not None:
            values[ATTR_TRANSITION_TIME] = transition_time

        return self.set_values(values, index=index)