Moisture sensor for an irrigation system