I have a problem with honey bees getting into the house. Hot, humid days drive the bees to greater activity outside, and I used to see more of them inside too on those days.
Last summer I found a hole high up near the ceiling where the bees came in. I plugged the hole with insulation. While that action greatly reduced the number of bees coming in to the back of the house, some bees still found their way in, making life a little more interesting than I really wanted it to be.
One morning this summer I noticed the curtain on the bathroom window was closed, and there weren’t any bees around. A thought hit me: Bees are naturally drawn to light. If a bee is inside, it automatically flies to the nearest source of light, whether that is a window or a light bulb. In the case of the light bulb, the bee fries itself, because it can’t stay away from the light.
That bit of knowledge led to a solution: I taped black plastic garbage bags to the bathroom window and the window on the back door. Although that makes the back part of the house very dark (like a cave), I don’t have bees coming in, so that part of the problem is solved.
Moral of the story: If you have a problem with wildlife in or around your house, think about what the particular species is attracted to/repelled by, and work from there.