code: def set_level(self, val):
          
          speed = self._value_to_fan_speed(val)
          if val == 0:
              self.off()
          else:
              set_command = ExtendedSend(self._address,
                                         COMMAND_LIGHT_ON_0X11_NONE,
                                         self._udata, cmd2=speed)
              set_command.set_checksum()
              self._send_method(set_command, self._on_message_received)
docs: Set the fan speed.