1. A method of sealing a watertight electrical compartment of an irrigation device, comprising:providing an electrical compartment body, the electrical compartment body comprising a chamber with an open end, threads, and a sealing section, the sealing section located closer to the open end of the chamber than the threads;
mounting at least one sealing ring into at least one groove, the at least one groove located on the sealing section or on an inner wall of a cap, the cap having an open end and a closed end;
sliding the open end of the cap over the sealing section, the cap having an internal diameter configured to have a sliding fit with the sealing section, wherein the at least one sealing ring seals a space between the sealing section and the inner wall of the cap;
sliding a cap retainer having first and second ends over at least a portion of the cap so that the at least a portion of the cap passes through the first end of the cap retainer, the cap retainer having a stopper on the second end for retaining the cap, the cap retainer further having threads; and
turning the cap retainer relative to the electrical compartment body so that the threads of the cap retainer mate with the threads of the electrical compartment body to keep the cap in a sealed position.