Stay off till some point. Answered....thanks guys

Use >= and <= tests, not ==. Otherwise you may miss the crucial measurement and drain your cistern. Make sure that the set points are far enough apart that the solenoid isn't in any danger of being rapidly cycled - although it sounds like you already have this under control.