Automated deterrents for pests