Remembering Dimmer Level to return to once untriggered by Motion Sensor

Patrick, Thanks for the Reactor and SiteSensor Plug-ins. You brought new light into my Vera world.

Use Case:
I have a Dimmable Light and a Motion Sensor.
The Light can be at different load levels throughout the day based on timed Vera scenes and other.
I have a Motion sensor by this light and I would like to raise the light level to 100 then return it to its previous level once the Motion sensor un-triggers (5 minutes if no further motion).
That previous dimmer level could be 0-100.

Progress so far:
Using Expressions – ‘getstate( 5, “urn:upnp-org:serviceId:Dimming1”, “LoadLevelStatus” )’
This does return the current level but it updates to 100 with the trigger (makes sense).
Tried using ‘“LoadLevelLast”’ but it returns the same value as LoadLevelStatus for this device.

Question:
What do you recommend on how to save the device’s LoadLevel variable when the Motion Sensor triggers?

Thanks for any advice,

Create a variable with no expression, and name it something like “priorlevel” or whatever works for you. Keep your existing getstate() expression as well (using LoadLevelStatus). You didn’t say it’s name, so I’ll call it “currentlevel” in the rest of this reply.

Then in your Activity that turns up the light, before the device action, put in a SetVariable action on the current ReactorSensor to set “priorlevel” to {currentlevel} (note curly braces wrapping your variable name). This will save the value of “currentlevel” into “priorlevel” right before the device action changes the light.

Later, to restore the prior light level, use a device action, and in the level field, enter {priorlevel}, and it will sub in the saved level.

I Don’t know why a ‘No Expression’ variable wasn’t obvious to me but it Works perfectly and opens more possibilities, thank you!

1 Like

Best Home Automation shopping experience. Shop at getvera!

© 2020 Vera Control Ltd., All Rights Reserved. Terms of Use | Privacy Policy