How do I set variable value manually?

variables

#1

Hi. I’m using a piston to count the days that a simulated switch has been off and alert me if more than 10 days pass. I first tried to make it with “if switch stays off for 10 days, send push notification” but it didn’t work. How much time can WC keep track of?

Anyway now I created a time based piston that adds +1 to the variable every night. I created the piston yesterday and the last day this event happened was on monday, so I would like to set its value to 5. I read that if I set an initial value it will be reset every time the pison runs, so that’s not an option.

How do I set the value of the variable manually? I’ll probably only need to do this once.

Any other recommendations on how to achieve this?

Thanks
Rodrigo


#2

You can:

  • Open the piston (do not click on Edit)
  • Scroll below the piston, and look for “Local variables
  • Click the tiny pencil next to the variable you want to change

pic


#3

Thanks! I saw that but I thought that it would do the same as editing the initial value inside the piston :slight_smile:


#4
  • Doing it at the bottom is a one time thing…
  • Doing it up in the “define” section will force it each and every execution.