Return lights to previous state after x mins


#1

1) Give a description of the problem
Need newbie help with piston.
I have one piston that switches my outdoor light on at 10% and 2700K between sunset and sunrise. I have created another piston (see below) that if motion is detected in my Arlo camera to change the light if on to 100% and 5500K.
What I would like to be able to do is set the light back to the original state after 2 minutes of no motion and I am not sure where or how to add that statement.

2) What is the expected behaviour?
Set lights back to original state

3) What is happening/not happening?
need help

4) Post a Green Snapshot of the pistonimage

5) Attach logs after turning logging level to Full
(PASTE YOUR LOGS HERE THEN HIGHLIGHT ALL OF THE LOGS AND CLICK ON THE </> ICON TO FORMAT THEM CORRECTLY)

REMOVE BELOW AFTER READING


#2

Select the light/s you want, and the attribute you want i.e. Set level
Then Save Attributes to local store.
Do stuff.
Then select same device/s and attribute,
Restore attributes from local store.


#3

Thank you I will give that a go.
Is it possible to just re-execute the dusk to dawn piston? just as a thought.


#4

If you want to go back to 10% and 2700K, if it’s that simple, YES you can just add another IF block.

IF MOTION SENSOR 3 STAYS INACTIVE for 2 MINUTES
Then White bulb 4
Adjust to this and that.

Note 1: Line 20 is an empty IF statement…
Note 2 : One light bulb is monitored by several pistons may cause problems and confusion as your system/house gets more complex FYI.


#5

Sorry for the delay in responding.
Thanks for that feedback I really appreciate it.
So basically you want to keep the number of pistons to a minimum especially if they are dealing with the same device.
So I reworked my Dusk to Dawn piston to include the motion detection. Now for some unknown reason the light is not switching off after dawn. Would you mind taking a look at it? My assumption is that if the 1st condition is not met i.e. between sunset and sunrise then it would go to the Else to turn the light off.

Thanks again

Tony


#6

I would write your piston more like this:
I personally avoid using ELSE…

Everyday at sunset (Timer or IF)
Turn Light bulb 4 ON
Set level to %10
Set temp tp 2700

Everyday at sunrise (Timer or IF)
Turn Light bulb 4 OFF

IF motion sensor 3 motion changes to ACTIVE
      IF time is between sunset and sunrise (IF within IF)
      With white bulb 4
      Turn On
      Set level to 100
      Set temp to 5500
IF motion sensor 3 motion stay inactive 2 minutes
      IF time is between sunset and sunrise (IF WITHIN IF)
      With white bulb 4
      Set level to 10
      Set temp to 2700