PLEG - Set target Paremeter help

I few weeks back, I realized I could eliminate adding extra conditions by using
Set target and New target value with an if statement in the action.

In order to save on creating one condition, how could I do the following, using 2 triggers?

Condition: cLivingRoom

Action: Device Action, Arguments:New target value: if the trigger tPianoLightOff @ 2 < 10 fires, turn off the back wall light, but if tPianoLightON @ 2 < 10 fires, turn ON the back wall light.

Is this possible to have this type of scenario in a single action?

Thanks all!

NO … you need two different conditions … because those are TWO DIFFERENT events.

I would not go out of the way to try to reduce conditions and put logic in the actions …
But take advantage of it when it makes sense.

ok, that makes sense, thanks Richard!!!

[quote=“RichardTSchaefer, post:2, topic:186398”]NO … you need two different conditions … because those are TWO DIFFERENT events.

I would not go out of the way to try to reduce conditions and put logic in the actions …
But take advantage of it when it makes sense.[/quote]

Not to Hi-jack, but I think that the OP would also appreciate this question. Can you possibly give some quick scenarios when they would make sense? I’m not even sure it’s possible to put “logic” in the actions, unless you are referring to putting something like {(condition_name)} in the advanced settings tab for a devices actions (that may not make sense)

If you find the need to create a separate action … just to issues a variant of the same action … then you can add logic in the action instead.

I.e. On motion turn a lamp on at 20% after 10 PM and 100% otherwise (night bathroom light).

The action could be:

SetTargetLevel {(!(6:00:00; Motion; 22:00:00) ? 100 : 20)}

[quote=“RichardTSchaefer, post:5, topic:186398”]If you find the need to create a separate action … just to issues a variant of the same action … then you can add logic in the action instead.

I.e. On motion turn a lamp on at 20% after 10 PM and 100% otherwise (night bathroom light).

The action could be:

SetTargetLevel {(!(6:00:00; Motion; 22:00:00) ? 100 : 20)}[/quote]

Now see, I tried that and it didn’t work!!!

I did:

Hallway: Lights SetLoadLevelTarget newLoadlevelTarget {(t_UtilityDayState_4_ON ? 10 : 100)}

and when my action fires, it actually said that as the dimming level (not in the devices section of the scene editor but actually on the device page itself).

But you know what, I went back to redo it to show you and it worked…LOL Go figure!

Thanks RTS!