I’m not sure that I follow…
How can I disable a piston timer from the switch itself?
I mean if the “changes to switches or levels” isn’t an option for cancelling your pistons tasks… we can do it with a SmartThings routine, or if you have a dashboard set up, a tile on your webCoRE dashboard.
Would either of those work for you?
Unfortunately, not really. None of those really have a high wife acceptance factor. I was really hoping it could be done from the switch. Of course, it can but I have to have a piston for every switch, which doesn’t have a high @flyize acceptance factor.
However, I may just have to live with it.
Ha, I feel your pain on both counts. I keep getting the “how is using my phone and digging through menus better than flipping a simple switch?” speech. Lol
Is this still an issue? I am pretty sure you can have variables inside [dev:attr]
constructs and then use those inside the previousAge()
function, but I can double check and fix it if not working as expected.
@ady624 It seems it was just a syntax problem with capitalisation of the S for the attribute… but only for device variables, not device names.
[device name : switch] - works
[device name : Switch] - works
[variable name : switch] - works
[variable name : Switch] - does not work
Overall user question wasn’t resolved though… $currentEventDevice does not work across parallelism, there can only be one $currentEventDevice, not multiple in parallel
There are still some challenges with cancelling a fade set in motion by a piston, too. I don’t necessarily think it’s a “bug” but it would definitely be an enhancement if there was an easier way to cancel a fade from within a piston (specifically if a switch is used on one of the lights that are part of the fade command).
Thanks!
Can I assume that getting $currentEventDevice to work across parallelism is a much more difficult task?
I’m having real trouble figuring out how this amazing looking piston works, but it worked! The only thing I haven’t tried is using it with multiple lights at once, but I think I see some sort of array in there, so I assume you have accounted for that.
WOW thanks!
btw, once you have confirmed its working, remove the log statement for better efficiency.