As the title says, I'm using HB to farm ore and herbs and I don't want it to be bothered with any monsters. Is there a line that I can add to the profile to avoid everything?
No. The <AvoidMobs> tag used in Profiles just tells HB not to show initial aggression toward the listed mobs. It won't actively avoid the mobs.
Basically, you've got the best that can be done if the profile is just a 'farming' profile. HB will defend itself if attacked, but not initiate aggression towards any mobs. If you turn on 'ground mount farming' mode, HB will even ignore mobs that are several levels below your toon, and try to outrun them before it gets to the next harvest.