Really, it's not about the lavender or the pretty smell. It's about the menthol. I suspect there are other, related compounds in lavender that bugs also hate, but bugs of all types REALLY hate menthol.
Back in Hawaii, I was thinking of moth-proofing the stash, because, duh, lots of money spent, there. And I was going to go with moth balls (which also have menthol in them) when the Plant Freak in me had an idea. You see, back in the Middle Ages, when the Black Plague hit Europe, the two areas of Europe that grew lavender for the perfume trade - Norfolk, England, and the south of France - had almost no cases of plague. It's because the whole area reeked of lavender and menthol, and the fleas carrying the disease stayed away. That's where the whole idea of pretty smells keeping away the plague came from. It's not the 'pretty' that keeps away the bugs, it's that funky undertone of lavender, which is, of course, the menthol.
Lavendula angustifolia is the species with the most menthol, of the species grown commercially. Another plant that has a lot of menthol in it is peppermint. You could fling some peppermint teabags around your yarn and it would work. (Or, you know, rub it with Vicks Vapo-Rub. Ha.) I buy my lavender by the pound, here. The lavender oil works, too. Use it sparingly and try to keep it off your skin. It won't cause any skin problems - I use it on infected burns when I get them - but there's debate about lavender oil screwing with your hormone levels, so better safe than sorry. When I put it on the Goob for mosquito repellent, I put a drop on each shoulder of her shirt, and a drop on the cuff of each pant leg.
Other bug-repelling plants are eucalyptus, pennyroyal, most pines, wintergreen, and most mints. Available mints that grown in the US, all of them are bug repellent to some degree. Yeah, pennyroyal and wintergreen are also mints, but almost no one thinks of them that way. Of those, pennyroyal is toxic, and a little bit of pine scent goes a long way. So I suggest sticking to culinary mints or lavender.