321 - IF Variable #25 becomes < 200 // Counter Light
0322 - AND Time of Day is > 08:00 //
0323 - THEN Timer #22 = 1 // start timer
0324 - IF Variable #25 becomes > 205 // if level goes high
0325 - AND Time of Day is > 08:00 //
0326 - THEN Timer #22 = 0 // stop timer
0327 - IF Timer #22 becomes > 100 // if light level stays low for 2 min
0328 - AND Variable #26 is NOT = 1 // Light is OFF
0329 - THEN X-10 House N / Unit 7, Turn ON // Counter Light ON
0330 - THEN Variable #26 = 1 // flag set for ON
0331 - THEN Timer #22 = 0 // stop timer
0332 - IF Variable #25 becomes > 220 //
0333 - AND Variable #26 is = 1 // Counter Lamp was turned ON
0334 - THEN Timer #7 = 1 //
0335 - IF Variable #25 becomes < 215 //
0336 - THEN Timer #7 = 0 //
0337 - IF Timer #7 becomes > 200 // light level stays high for 2 min
0338 - THEN X-10 House N / Unit 7, Turn OFF // Counter Lamp OFF
0339 - THEN Variable #26 = 0 // reset
0340 - THEN Timer #7 = 0 // reset timer

The first part Guy help me to write, to turn on the light only if the light level remains low for set time. What I have done is the same to turn off the light if the light level goes high (bright) for a set time as well.

Also, line 328, I want the light to TURN ON only of its OFF, but I don't quite know how to write in the code to reset Timer #22.

Thanks,
Neil
_________________________
Neil