Page 1 of 1

Brighten light to a variable?

PostPosted: Sat Dec 17, 2016 4:39 am
by rustyhodge
I have an action that I want to brighten a light for a few minutes, then return the light to the previous state (which is usually a dim level).
I can create an action group that will store the previous brightness level in a variable (it stores 0 if the light is off), and then can brighten the lights; I planned to have a delated action to turn the lights back to where they were by brightening them to the variable amount, but I don't know how to pass this on.

Any suggestions?

Thanks!

Re: Brighten light to a variable? (Solved)

PostPosted: Sat Dec 17, 2016 4:57 am
by rustyhodge
I guess you need to run a Python script to do that, as discussed here:

viewtopic.php?t=9922&f=18

Re: Brighten light to a variable?

PostPosted: Wed Dec 21, 2016 2:30 am
by jh71283
Why not set a server variable to that level? Then you can just create a timer for however long you need and when the timer expires, set the light back to the previous brightness variable


Sent from my iPhone using Tapatalk

Re: Brighten light to a variable?

PostPosted: Mon Feb 06, 2017 2:42 am
by rustyhodge
The problem you run into is that all the events in an action group happen at about the same time, and your setting of the device brightness level can happen after the device is brightening already. You could put a delay on the command that brightens the device, but that's not a good user experience to have to wait 1-2 seconds for the lights to come on.

The order if events in an action group is not defined, and can happen in any order, usually in parallel.

Doing it in a python script lets you do things sequentially.