Newbie, please help need to add a condition

Hi
I am new to Vera Lite, I presently have a motion detector in my living room and wrote a scene that turns on my living room light for five minutes, to be able to go to the kitchen at night. It also does it in the day and I would like to add a condition that it only occurs from dusk to dawn. I downloaded pleg app but I am inexperienced and don’t know how. I have been reading info on pleg and it’s overwhelming to someone new. Very anxious to learn.
thanks

PLEG Basics - An Introduction to the Program Logic Event Generator by @RexBeckett

See Example #1.

I also had a tough time just getting started. Guess I am more of a visual learner. As @Zwaver said "PLEG Basics - An Introduction to the Program Logic Event Generator by @RexBeckett is a great tool. There are also some good videos on You Tube.

Thanks for the reply. I am using veralite UI 17. I read pleg basics. I read example 1 and understand the concept. The tutorials on line don’t look like my interface. I have never been a quitter, but starting to believe it’s not worth the aggravation. I cannot get past creating a logic event device. I am willing to pay for private tutoring if someone out there is available.

If I read your post correctly you simply want your scene to run only at night. The simplest way to do this is to add the Luup code below. If Luup code is present, the scene will always run it first, then run the rest of your scene. If you add the following Luup code it will terminate your scene if it’s between dawn and dusk so it won’t run the rest of your scene.

– Continue scene execution if it’s night time
– Exit scene if it’s daylight
if (luup.is_night()) then
return true
else
return false
end

Good luck.

Thank you very much, I will try it!