Lights not turning off

I’m still new to pleg and slowly migrating things over. I love the fact that you can randomize the time. This is something I’ve wanted in Wink for years and would love it to become native in Vera too. Anyway, my issue.

I understand there is a vulnerability in using absolute times to schedule events. In my testing I have been able to turn a light on at Sunset or Sunrise +15. But I cannot seem to get the light to turn off afterwards. I feel like I am missing an Off action. I can see the status turn true and 20 minutes later to false, but the light was still on.

In the attached Status report s_Sunrise is the schedule. c_Sunrise is the condition. When true, sets the loadlevel of my office light to 100%.

What am I missing?

You don’t have an off condition defined-

Where/How do I add that in? From the Logic Action pull down, I don’t have my c_Sunrise to select again. If I’m supposed to add an interval into the action, then how do you specify the absolute off time?

If it were me I would create a separate off condition.

But if you want to add to c_Sunrise it is standard scene editing. Add in a delay and the action. You can’t do a time that way, but a delay duration…

Adding a delay option within the Action seems to negate the Off option within the Condition. Plus I wanted to have a randomized absolute off time.

But I think I understand, just like there is an On Scene and Off Scene within the Native Vera Scenes, I would need an On Condition and Off Condition within Pleg. Correct? I was under the impression that these could be coupled into one condition. (Pleg Newbie here.)

Got it! Took a trial and error. My Off condition needed an On time frame.

Thanks for the help. Time to register my PLEG.