SmartThings Rest API using Tasker

If you don’t care about whether the light is on or off, you can save the trouble (and delay) of polling the status before sending the command by using a virtual momentary switch.

  1. Create the momentary switch using @TAustin 's virtual device creator.

  2. Create a routine so that when your virtual momentary switch turns on, your (real) light toggles.

  3. Always send an “on” command via tasker to turn on the virtual device, which will toggle your light.

Hope that helps!