General Help, with delay - or timed/wait before digitalwrite

Just want to add a delay that only waits to perform the digitalwrite...

Right now it works once, but then the solenoid will not turn off...
here is some video help...

Float is just a reed switch, maybe needs more resistance.

const int FLOAT_PIN = 8; // Pin connected to FLOAT switch (OPEN=FULL, CLOSED/CONTINUTITY = NEED WATER)
const int SOLENOID_PIN = A0; // SOLENOID pin - active-high

void setup() {
Serial.begin(9600);
// Since the other end of the FLOAT switch is connected to ground, we need
// to pull-up the FLOAT switch pin internally.

pinMode(FLOAT_PIN, INPUT_PULLUP);
digitalWrite(SOLENOID_PIN, LOW);
pinMode(SOLENOID_PIN, OUTPUT);

}

void loop() {
digitalWrite(SOLENOID_PIN, LOW); //sanity check, water is normally off

if (digitalRead(FLOAT_PIN == LOW)) // if it needs water 
{
delay(10000); // delay BEFORE filling. 
while(digitalRead(FLOAT_PIN == LOW)){ // Fill till sensor says full, then exit. Water turned off at sanity check. 
digitalWrite(SOLENOID_PIN, HIGH);
} //end while
} //end if

} //end loop

I've sent a personal message that you should read IMMEDIATELY. Look at your profile in the circle, upper right corner of this page.

if (digitalRead(FLOAT_PIN == LOW)) // if it needs water

A closing parenthesis is in the wrong place:

if (digitalRead(FLOAT_PIN) == LOW) // if it needs water

Same problem a few lines down:

while(digitalRead(FLOAT_PIN == LOW)){

... should be:

while(digitalRead(FLOAT_PIN) == LOW){

Also, switches like this should be debounced. Try the Bounce2 library.

I would also suggest looking at Using millis() for timing. A beginners guide, the Blink Without Delay technique and related examples in the General Design section of the Useful Links page.

That did the trick, thanks.