Most of the time woodpeckers are attacking your home because it is finding food under your siding, or insects. You would really need to determine what pest is in the area where the bird is doing damage, and treat properly to kill any pests behind the stucco and therefore if there is no more food, the bird will go elsewhere. The bird could also be targeting the area for nesting material. You can try other non-chemical methods by placing reflective tape in the area or other
deterents to deter the woodpecker.