Apparatus and associated methods relate to a pest repelling magnetic field generating device (PRD) having a temperature sensor to detect the temperature of a solenoid coil during operation. The detected temperature to be used to ensure that the PRD operates within an ideal temperature range. Additionally, a fan is oriented within a housing of the PRD to force the flow of air from inside a housing of the PRD to outside a housing the PRD. In an illustrative example, the PRD may shut off if the temperature of the solenoid coil moves outside the ideal temperature range.