I live in Costa Rica and I want to use IFTT to turn off all lights.
I cannot SMS because is not supported with my country, so I tried to make a code to use a virtual switch as a momentary button and turn all lights off but it is not working.
I’m new in the code writing so any help is well received.
preferences {
section(“When this switch is pushed”) {
input “master”, “capability.switch”, title: “Where?”
}
section(“Turn off all of these switches”) {
input “switches”, “capability.switch”, multiple: true, required: false
}
}
I don’t know that I will be able to help you with your code (i’m certainly no programmer), but as an FYI if you highlight all of your code and press the </> button, or surround your code with a ` symbol it will format your code so that it is easier for people to read (especially helpful for those community members that use TTS)
Are you using a smart lighting automation connected to this virtual switch to turn them all off? I use a similar manner (not always smart lighting) of connecting common groups of switches and bulbs to virtual switches for organization.
I’m not sure if it’s possible to create a virtual switch and connect that switch in the DTH to all other switch functions.
Thanks, now I can turn the lights OFF with the master virtual switch.
Now I need to work on making it a momentary button, in other words I need the switch to auto reset after 2-3 seconds after activated.