Issues with Dimmer/Motion Pleg

Hello,

I am hoping someone can give me a hand with my Pleg, I have added a new Dimmer switch to my Existing PLEG logic and it is not behaving how I would like it too. I Would like the dimmer to dim to 30% brightness from 11:30PM - 6:15AM every day. Also If I manually change the brightness level I would like it to stay at that level, right now if I change the Brightness value as soon as the motion sensor trips it sets the Light level back to 60%.

You need a new condition to hold the current brightness.

New Input Device Property:
CurLevel The Dimmers current LoadLevelStatus

SetDim KitchenDim ? 30: CurLevel ? CurLevel : 60

Then in the advanced tab for the actions where you set the light level to 30 or 60 replace the hard coded 30 or 60 with:
{(SetDim)}

The SetDim will get the new DimLevel if manually set (Except at night). If it’s set to OFF during the day the next default will be 60.

I tried what you suggested and now get an Invalid Expression message in Vera, any help?

Can anyone assist me with getting this logic working? I’m stuck at the invalid expression after adding Richards suggested logic.

Richard: I was able to get past the Invalid Expression error message, and I believe I setup the logic as you described. Can you please verify the logic looks correct for the Kitchen Light in the attached report?

So getting strange erratic behavior since making the logic changes suggested by Richard

Try:

KitchenDim ? 30 : CurLevel > 0 ? CurLevel : 60