Fade over time and task cancellation


#21

Ugh, it’s always the simple things.

For some reason though, in my piston it worked the way I tried to for @allrak. I had 3 dimmer switches increasing to 100% over 5 minutes, and I set a “if level or switch of any of those 3 change, then cancel all pending tasks” command. It worked… changes from the piston didn’t trigger the cancellation, but physical changes did. Is it a difference in DTH?

What is another simple way to help OP cancel a fade initiated by a piston?


#22

Cancelling fades is tricky and highly unreliable due to, I think, ST latency… or it might be a WC bug???


#23

okay, I think I’ll just give up and skip the fade in…

Thanks!
-jeff


#24

I too am looking for a solution if you’ve come up with something. I have my wife’s bedside light turn on and fade up from 2% to 75% over 20 minutes, wait for 15 then set the level back to 5%. If she shuts the light off the piston will turn it back on at the next increase in percentage. I’ve tried basically everything I can think of. If I pause the piston it seems to work. However then I’ll have to go in and check the piston every day and turn it back on. Will the piston pick up where it left off once reactivated? That seems like a total pain, I suppose I could also write another piston to check the status of this one and reactivate it if it has been paused.


#25

This is how I’ve set up my fade. When the condition of the IF statement goes FALSE the statement stops running. I can then turn off the light without worrying about it coming back on. Currently the statement goes false after a period of time or if I manually turn off the virtual switch that triggers everything. It’s a two step approach so I can’t just turn the light off with a single click (I’m using this as an “alarm clock”). There might be better methods but it works for my needs. Hope it helps.


#26

If I might ask, @simplygenius, when you refer to “the condition of the if statement” going false, which if statement within your code might you be referring to there?


#27

If the first one checking for the MBL1-Sunrise goes FALSE, the fade is cancelled due the the “Task cancellation policy” of the IF statement (click the Gear symbol when in the IF setup).