2-Mode Light Timer

Ok, so I have done a PLEG to get this to work, but I want to make it better because polling my switches to tell when they changed really makes it hard to “set” a longer timeout for the lights. Right now I have to start from off for 15 seconds, turn on for 15 seconds, turn off for 15 seconds and then turn on again and hope that in 15 seconds I will see the light flash off and back on (MultiSwitchSet). Default is to turn them off in 5 minutes, if set then off in 30 minutes.

Here is what I have right now:
Input:
LightOn = Light is turned on
Conditions:
MultiSwitch = LightOn @ 2 < 60
MultiSwitchSet = (LightOn @ 2 < 60) and (NOT (LightOn @ 3 < 60))
LightAutoOff = (MultiSwitch and (LightOn; Now > 30:00)) or ((Not MultiSwitch) and (LightOn; Now > 5:00))
Scenes:
Trigger of MultiSwitchSet, action Turn light off and then back on (so I know the system detected the request)
Trigger of LightAutoOff, action Turn light off

What I want to add is a scene button on my 45600 remote to set the MultiSwitch state and flash so I know it is set.

I also have a problem when Vera reloads. I see “Vera Startup” in Vera Alerts and then any switch that was on and in a set condition gets turned off. No knowledge of MultSwitch being set I am guessing…

Great flexablity, but sometimes it stretches me too far to get it to do what I want.

I did not make the multi-click state persistent. I can fix that.
Is there a problem with your setup ?
I am not sure I fully understand what you are trying to accomplish.

With my light switches it takes about 15 seconds for vera to tell they have changed. That makes it hard to set the MultiSwitch variable.

So I was looking at adding a scene button as another way to set it. What is the best way to add that to the current logic?