def set(self, is_on=None, brightness=None, cancel_transition=True):
if cancel_transition:<EOL><INDENT>self._cancel_active_transition()<EOL><DEDENT>if is_on is not None:<EOL><INDENT>self._is_on = is_on<EOL><DEDENT>if brightness is not None:<EOL><INDENT>self._assert_is_brightness(brightness)<EOL>self._brightness = brightness<EOL><DEDENT>self._update_pwm()<EOL>
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.