Help with PLEG Light Conditions

I am having a small issue with my first PLEG routine. My goal is to turn on the house lights when I open my garage door. However, I only want this to happen when I get home and not when I leave. Thus I am introducing the entry door to the garage since this door would have to be open/closed when leaving home but not when returning.

AutoOn Not LightOn and (DoorToGarage;Garage1>1:00)

This seems to work fine, but when I manually turn off the light when I get home, it automatically turns back on! I understand why this is occurring (because the condition is still true), but I am not sure how to get it to stop. I don’t really want the light to be a trigger anyway, and would prefer the condition to be fired only when the garage door is opened. Should I just remove the LightOn trigger?

When posting PLEG questions, it is best to post your status report with it.

when you say “remove the LightOn trigger” do mean “remove the Not LightOn” in your condition group for the light action?

Thanks for the prompt response and the tip about the status report (now attached). Yes, I am wondering if removing the “Not LightOn” would help since manually turning off the light would not fire as a trigger. I am basically just trying to figure out the best way to stop having the light keep turning back on.

Thanks again,

I would do it as follows:

ButlerPantryOn Not LightOn and (LightOn;Garage1) and (DoorToGarage; Garge1 > 3:00)

The second (new) term only is true if the light was turned on before the garage was opened. It could have been turned on last week and still be true.
If the light is turned on After the Garage Door is open (i.e. from the action or manually) this condition becomes false.

You might also include the Day or Night plugin. Then an input of:
Night Day or Night indicates night.

Then the condition will be:
ButlerPantryOn Not LightOn and Night and (LightOn;Garage1) and (DoorToGarage; Garge1 > 3:00)

Thanks guys! I now understand how the new term will help me out and seems to work fine now. One other question, the garage actually has 2 doors and I have a sensor on both of them. I could take the easy way out and just have 2 conditions as seen below. But I thought I would at least ask if its possible to have in one condition. I am definitely learning the PLEG logic!

ButlerPantryOn1 Not LightOn and (LightOn;Garage1) and (DoorToGarage;Garage1>1:00)
ButlerPantryOn2 Not LightOn and (LightOn;Garage2) and (DoorToGarage;Garage2>1:00)

You could do it with one … but it would be pretty long.
If you did not want to duplicate the actions … then add a 3rd condition:

ButlerPantryOn ButlerPantryOn1 or ButlerPantryOn2

And put the action(s) on ButlerPantryOn

It’s no big deal to have multiple lines of conditions. It’s better that you can read/understand it.

thanks for posting questions and answers - helpful for me as I start my PLEG journey.

I have printed off the guides and scribbled over them, and am practicing building my logic with annotations in Evernote (so I have a record of what I am doing)