PLEG Logic

PLEG Logic check please :slight_smile:

I have this in an custom argument action trigger:
(21:00:00;pWillCeilingLight >0;22:30:00) ? 100:0

I am trying to turn on a device when pWillCeilingLight > 0 (Load level status) changes from 0
between 9:00 PM and 10:30, if so, set his reading lights to 100 %, otherwise 0

I am probably missing a syntax somewhere, but not seeing it.

Thanks for the help…

Not sure, but:

The (X;Y > T) syntax is used for determining when the duration between X becoming true and Y becoming true is shorter than T, so maybe this confuses PLEG.

Maybe try:

(21:00:00;(pWillCeilingLight >0);22:30:00) ? 100:0

If that doesn’t work, the following sure will:

Conditons:
cWillCeilingLightNotZero: pWillCeilingLight >0
(21:00:00;cWillCeilingLightNotZero;22:30:00) ? 100:0

The following is ILLEGAL syntax:

(21:00:00;(pWillCeilingLight >0);22:30:00) ? 100:0

That is because:
(pWillCeilingLight >0)
is an expression. An Expression does NOT have a timestamp.
As @cafri indicate … you can assign this expression to a condition. Then the condition will have a timestamp.

Also when you put this in the arguments for an action you would need to use:
{((21:00:00;cWillCeilingLightNotZero;22:30:00) ? 100:0)}

ok - so I think I understand about an expression not having a time stamp, but in trying to streamline, I was hoping to avoid a condition if I could handle it in an advanced argument, so is there any way around an extra condition? if not, great learning lesson that an expression has no time stamp, and cannot be used in my original scenario.

I had to use the property, vs a trigger, as this Caseta / Wink hub/ wink plugin :o scenerio seems not to work with a typical trigger, so I set the property as an input.

If the trigger worked … you would have been able to use the trigger in the action’s argument, all inputs have timestamps.