-= is a compound assignment operator. x -= y is similar to x = x - y, except that x is only evaluated once.
Thanks again for the help. I figured the syntax was something like that, but wasn’t sure. I’ve gotta do more reading up on groovy. It probably helps a lot if you know Java, which I don’t.
You could. It is just that I don’t have a dimmer switch so I don’t know what command to use. I figured that you would know :)
Ah, okay… yeah, the command is switch.setLevel(##) where the ## = the level number between 0 and 99%
Why does it have to be a double tap? Can’t a single tap (or any other kind of events) do? (I don’t own an Evolve switch)
You can even subscribe to an event from a switch (one that you turn on/off when you go to bed) in your own bedroom.
The problem is that I don’t want to interfere with the normal operation of the switch. I have one dimmer switch in her room that controls the over head lights. I want these to work as normal… turn on the switch, lights go on. Turn off the switch, lights go off. I just want to have this extra function as a slowly dimming night light for when she goes to bed.
I do have some GE switches that I’m running a specific Double-Yap function on. If I double tap Switch-A, it runs program B. But when I tried to run that on the Evolve switches, it didn’t work. It might be that Evolve doesn’t respond in the same way, or it might be that these switches (which are upstairs, further away from the Hub then the GE ones) are simply out of range for this. ST reported at one point that GE and related switches (ie, ones that do NOT license the Lutron patent) can only really double tap when in direct communication with the Hub (not communicating thru the mesh).
I might be able to do something like turn off her light, then turn on my light, then turn off my light. If I figure out a way to capture that series of events I might be able to say that that triggers the app. But that might be as complicated as pulling out my phone.