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?
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.