Would like to restore lights to their previous setting after a piston runs


#1

1) Give a description of the problem
I want the piston to restore the lights and switches to the way it was before the piston ran, when the piston finishes.

2) What is the expected behavior?
If a dimmer was on set to 50% before the piston ran, it should be set back to 50%… If it was off, it should be set back to off.

3) What is happening/not happening?
Previous values are not restored when the piston finishes.

4) Post a Green Snapshot of the pistonimage

5) Attach any logs (From ST IDE and by turning logging level to Full)
(PASTE YOUR LOGS HERE BETWEEN THE MARKS)

I’m a new user, and I am probably not using the capture attributes and restore attributes as they were intended. How do I fix it?

REMOVE BELOW AFTER READING
If a solution is found for your question then please mark the post as the solution.


#2

capture and restore switch and level instead of switch and $status


#3

I don’t see the option to pick level from the dropdown, all that is there is switch and status.


#4

remove the switch and outlet from the with statement and please check if level shows


#5

With the outlet and dimmer removed, the level does show. How can I get it to work with the outlet and dimmer included?


#6

The lights flash as expected, but the level of the lights is not restored after the piston completes.


#7

Not sure this is going to completely help, but I am capturing state to turn lights full on when doors open and then setting them back to where they were after a few minutes…

I am not using a global variable for this, but a local store… I’m no expert :slight_smile: but it works this way … I am fairly sure you could swap out my fade to 100% with a flash routine without issue - as well as remove my time of day constraints


#8

you forgot to change the restore statement. :slight_smile:


#9

the dimmer inclusion should be find if it support level. the outlet probably does not support level and can only do switch. just use another capture statement to capture outlet switch to local state and at the end do a second restore from local state for the outlet only.


#10

I think I have it now. Thanks everyone!