Change the LED to red (on or off)
        :param on: True or False
        :return: None
166379
def to_red(self, on: bool=False):
        
        self._on = on
        if on:
            self._load_new(led_red_on)

            if self._toggle_on_click:
                self._canvas.bind('<Button-1>', lambda x: self.to_red(False))
        else:
            self._load_new(led_red)

            if self._toggle_on_click:
                self._canvas.bind('<Button-1>', lambda x: self.to_red(True))
1366602
def switch_on(self):
        """"""
        success = self.set_status(CONST.STATUS_ON_INT)

        if success:
            self._json_state['status'] = CONST.STATUS_ON

        return success
484168
public void setLedBlinking(final boolean LED_BLINKING) {
        ledBlinking = LED_BLINKING;
        if (LED_BLINKING) {
            LED_BLINKING_TIMER.start();
        } else {
            setCurrentLedImage(getLedImageOff());
            LED_BLINKING_TIMER.stop();
        }
    }
1109621
def set_led(self, led_id, color):
        
        if not set_leds_color(self.corsair_sdk, LedColor(led_id, *color)):
            self._raise_corsair_error()
        return True
1286174
def set_hue(self, hue, duration=0, rapid=False):
        
        color = self.get_color()
        color2 = (hue, color[1], color[2], color[3])
        try:
            if rapid:
                self.fire_and_forget(LightSetColor, {"color": color2, "duration": duration}, num_repeats=1)
            else:
                self.req_with_ack(LightSetColor, {"color": color2, "duration": duration})
        except WorkflowException as e:
            raise
392046
def set_color(self, red, green, blue):
        
        if self._pwm_enabled:
            # Set duty cycle of PWM pins.
            rdc, gdc, bdc = self._rgb_to_duty_cycle((red, green, blue))
            self._pwm.set_duty_cycle(self._red, rdc)
            self._pwm.set_duty_cycle(self._green, gdc)
            self._pwm.set_duty_cycle(self._blue, bdc)
        else:
            # Set appropriate backlight pins based on polarity and enabled colors.
            self._gpio.output_pins({self._red:   self._blpol if red else not self._blpol,
                                    self._green: self._blpol if green else not self._blpol,
                                    self._blue:  self._blpol if blue else not self._blpol })
1148005
def _set_LED(self, status):
        
        # DIO pin 1 (LED), active low
        self.hw.remote_at(
            dest_addr=self.remote_addr,
            command='D1',
            parameter='\x04' if status else '\x05')
77998
def set_led(self, red=0, green=0, blue=0):
        """"""
        self._led = (red, green, blue)
        self._control()
997341
def start_change(self, direction):
        """'"""
        self.logger.info("Dimmer %s start_change: %s", self.device_id, direction)

        if direction == 'up':
            level = '01'
        elif direction == 'down':
            level = '00'
        else:
            self.logger.error("Dimmer %s start_change: %s is invalid, use up or down",
                              self.device_id, direction)
            return False

        self.hub.direct_command(self.device_id, '17', level)
        success = self.hub.check_success(self.device_id, '17',
                                         self.hub.brightness_to_hex(level))
        if success:
            self.logger.info("Dimmer %s start_change: Light started changing successfully",
                             self.device_id)
            self.hub.clear_device_command_cache(self.device_id)
        else:
            self.logger.error("Dimmer %s start_change: Light did not change",
                              self.device_id)

        return success
603434
public void setCustomLedColor(final Color COLOR) {
        model.setCustomLedColor(new CustomLedColor(COLOR));
        final boolean LED_WAS_ON = currentLedImage.equals(ledImageOn) ? true : false;

        switch (getOrientation()) {
            case HORIZONTAL:
                recreateLedImages(getHeight());
                break;
            case VERTICAL:
                recreateLedImages(getWidth());
                break;
            default:
                recreateLedImages();
                break;
        }

        if (currentLedImage != null) {
            currentLedImage.flush();
        }
        currentLedImage = LED_WAS_ON == true ? ledImageOn : ledImageOff;

        repaint(getInnerBounds());
    }
254526
def is_on(self, channel):
        
        if channel in self._is_on:
            return self._is_on[channel]
        return False
974546
def set_key_color(self, color: Optional[Tuple[int, int, int]]) -> None:
        
        self._key_color = color
1271450
def status_light(self):
        
        result = self.deviceProperties.GetLEDState()
        LEDState = result["CurrentLEDState"]  # pylint: disable=invalid-name
        return True if LEDState == "On" else False
123283
def set(self, is_on=None, brightness=None, cancel_transition=True):
        
        if cancel_transition:
            self._cancel_active_transition()

        if is_on is not None:
            self._is_on = is_on

        if brightness is not None:
            self._assert_is_brightness(brightness)
            self._brightness = brightness

        self._update_pwm()
1326519
def to_green(self, on: bool=False):
        
        self._on = on
        if on:
            self._load_new(led_green_on)

            if self._toggle_on_click:
                self._canvas.bind('<Button-1>', lambda x: self.to_green(False))
        else:
            self._load_new(led_green)

            if self._toggle_on_click:
                self._canvas.bind('<Button-1>', lambda x: self.to_green(True))
650593
def light_on(self, button: Button):
        """"""
        self.outport.send(mido.Message('polytouch', note=button.light, value=1))
260975
def to_yellow(self, on: bool=False):
        
        self._on = on
        if on:
            self._load_new(led_yellow_on)

            if self._toggle_on_click:
                self._canvas.bind('<Button-1>',
                                  lambda x: self.to_yellow(False))
        else:
            self._load_new(led_yellow)

            if self._toggle_on_click:
                self._canvas.bind('<Button-1>',
                                  lambda x: self.to_yellow(True))