There is disclosed herein a sensor for detecting at least one of urination and excretion into an incontinence garment, the sensor comprising an activation unit and a sensing unit and being connectable to a power supply the activation unit comprising: two spaced-apart electrodes, and a switch arranged in series between the sensing unit and the power supply wherein the activation unit is configured to activate the sensing unit in the presence of moisture by closing the switch and wherein at least one of the sensing unit and the activation unit comprises a latching circuit arranged such that the activation of the sensing unit is irreversible. An incontinence garments such as the diaper is incorporating such a sensor is also disclosed as it is a method for operating such a sensor or incontinence garment.