Can I use a condition as an expression?

Can I use a condition as an expression? I think I know the answer but need to confirm. If I throw a condition into another condition as an expression, the condition is always true. If I do !Condition then the condition is always false. This is what I am finding with my testing. If I am right, then how can I tell one condition that another condition has changed from true to false. I am trying to control my outside flood lights. See attached. See condition cLightsAreDim. I need this condition to know when cLightsAreBright is false. Any help is appreciated.

Thanks,

Woody

You can use a Condition as a term in another Condition expression. Positioning is important. PLEG evaluates Conditions in order from the top down. When a Condition changes, its new value will be used in other Conditions below it but it will not cause earlier Conditions to be re-evaluated.

RexBeckett

Every time I post a question on this forum, I am hoping it is something that wasn’t covered in the PLEG Basics. Of course when I saw your reply, I went back and looked again.

"Conditions are evaluated from the top down. If you use the value or timestamp of one Condition in
another, the order of the Conditions is significant. If you refer to the value or timestamp of a
Condition that is below your expression, you will be using the results of the previous evaluation run. "
Quoted from PLEG Basics. [url=http://forum.micasaverde.com/index.php?topic=21603.0]http://forum.micasaverde.com/index.php?topic=21603.0[/url]

Doh!!! I read that section several times and still did not put two and two together. Of course, it was easy to find once I knew what I was looking for.

Thanks for the help. I have made the changes and will test tonight.

Woody