Set properties of the led simultaneously before updating pwm values.

        :param is_on: On-off state of the led.
        :param brightness: Brightness of the led.
        :param cancel_transition: Cancel active transitions.

def set(self, is_on=None, brightness=None, cancel_transition=True):
        """
        Set properties of the led simultaneously before updating pwm values.

        :param is_on: On-off state of the led.
        :param brightness: Brightness of the led.
        :param cancel_transition: Cancel active transitions.
        """
        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()