Well, I'm new to the ATK like I said above, and thought I had it dialed in, but...maybe I just did something silly because I also just ran into the "runs until container runs empty" symptom Well, that should be a sad panda face but it isn't bad because I caught it in time since I was home. Now...to try and trust this before I travel next week. Somehow I triggered it to stay on or it did it on its own. Could be because I'm using default labels still so I'm guessing me. The gear icon, advanced, has it set up like below. I ran through the wizard to program it.
Fallback OFF
Set OFF
If Swx4_1 OPEN Then ON
If Swx4_2 CLOSED Then OFF
When On > 005:00 Then OFF
Defer 000:10 Then ON
Defer 000:04 Then OFF
Min Time 060:00 Then OFF
Guessing swx4_1 is an eye? Swx4_2 is the other eye?
Switch 1 is the lower optical sensor, switch 2 is the higher one. Switch 1 normally goes between OPEN and CLOSED all day, as water evaporates and is then replaced. With normal operation, switch 2 is always OPEN. The default switch labels are fine, but if you choose to change them, the code automatically reflects the new names.
The code looks ok. Was the pump running when you discovered the problem and if so, how long had it been running? If it didn't generate an Error condition and turn itself OFF (the actual tile switches itself to OFF), it shouldn't have been longer than 5 minutes. How big is your reservoir?
Another thing to consider is whether you're developing a siphon which is emptying your reservoir into the sump.