Jump to content

Variable +1 Using Rest Command


zerop

Recommended Posts

Posted (edited)

Is there a way to +1 to a variable using the rest command?  I use the following to set the variable to 2 and everything works fine.

/rest/vars/set/1/18/2

I'd like to be able to increment the variable using the rest command.  My current workaround is to have a program in the ISY that increments the variable ($VariableName += 1) in the "Then" part of a program and to use the rest command to run the program (/rest/programs/<programID>/runThen).  I'd like to skip the program part.

 

I've tried /rest/vars/set/1/18/+1 but that doesn't work.

Edited by zerop
  • 5 weeks later...
Posted

The program you have is the solution.  This is a specific use case, which has a working solution. So, I'm not sure it is a good fit for inclusion in firmware.

Guest
This topic is now closed to further replies.

×
×
  • Create New...