In my research, Tansy consistently comes up as a repellant to
ants, flies of all kinds and mosquitoes. I like how Tansy's properties are summarized in the book "Secrets of Companion Planting for Successful Gardening" by Louise Riotte:
"Tansy is considered poisonous to humans and to
cattle ... but planted under fruit trees, particularly peach, it repels borers, and is a good companion to roses, raspberries, blackberries, grapes and other cane fruits. It deters flying insects, Japanese beetles, striped cucumber beetles and squash bugs, helps repel flies and ants. The dried leaves are useful for storing woolens and furs. ... The plant contains volatile oil, wax, stearine, chlorophyll, bitter resin, yellow coloring matter, tannin and gallic acid, bitter extractive gum and tanacetic acid (which is crystallizable) and precipitated lime, baryta and oxide of lead. Because of its concentration of potassium, tansy is useful on the
compost pile."