Hello @hohm I added the code block to your message. Is the "Pumpe()" function your attempt for the second cycle, or do you want to add a second cycle to the Pumpe() function ? Because from what I see it's doing what you ask ? If humidity percentage is below limit activate pump, when pumped volume is over specified volume stop the pump, and after "fiveMinutes" are passed, reset the counter.