Room automation light control - programming problem

@HugoPT
Ooooh crap, I see what you mean. doorSensor needs to be doorSensorValue! :.
But how will I be able to run this part of the program only one time, without repeating it over and over again. Since that my door probably will be open longer then 1,5 seconds i don't want my Arduino to keep on sending a signal to my mainlight.

if (doorSensor == true){
Serial.println("Door Sensor True");
digitalWrite(mainLightOn, HIGH);
delay(1500);
digitalWrite(mainLightOn, LOW);

@retrolefy
Thanks for the good advice. I will use it as an digital pin. I also prefer that a lot more.
But do i still need to at this line:
pinMode(doorSensor, INPUT)