Smart Lights & Smart Switch Sync


#1

This piston synchronizes any smart lights and smart switch. The switch will work like a normal light on/off switch for lights but, if all the smart bulbs turn off (with voice command or app) then the switch will also turn everything off. For example:

Switch turns on - lights on
Switch turns off - lights off
When any light turns on - switch on
When all lights are off - switch off

This piston just allows more options to turn lights on/off when using voice commands or the SmartThings app.

Let me know your thoughts and see if it works for you!


#2

Thanks for the example. As a new comer, I learned a lot from this. I’ve now spent days and days and don’t get it to work. It seems that the two asynchroneous blocks of code interact in a unforseen way when a decent number of lights are attached. It works reasonably fine with two lights but totally fails with 8 or more. Did anyone get it to work? Would anyone recommend an alternative way to get the same result?

THX!