Jump to content

Variables, Integer vs. State, when/how to use


marvel

Recommended Posts

Posted

Hi folks,

 

Is there a tutorial somewhere on setting up & using variables?

 

I desire a simple "Goodnight" program. I figured I'd use a variable to track whether the house is in "Goodnight" status so devices/programs can change their behavior accordingly. I am unsure whether to use an Integer or State variable (I assume State variables are boolean and that's what I'd want?). I'm not sure what I'm supposed to put in the Init and Value fields, if anything. I'm assuming Init is the variable's desired initial state when the controller boots? But should that be "On/Off", "True/False", "0/1", or what? Also, assuming Value just displays the current value and I shouldn't put anything there? Is that right?

 

Any assistance would be appreciated.

 

Thank you!

Posted

Take a look at this section of the forum on Variables.

 

viewforum.php?f=68

 

Values are normally set for Init and Value when the variable is initially defined.

 

Variables are signed integers. State and Integer variable content is identical. The difference is a change to a State variable value causes a Program to be triggered (like If Status for a device), a change to an Integer variable value does not cause a Program to be triggered. This and much more is covered in topics under the Variables category link provided above.

 

Feel free to post back if these topics do not cover your questions.

Guest
This topic is now closed to further replies.

  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

  • Forum Statistics

    • Total Topics
      37k
    • Total Posts
      371.5k
×
×
  • Create New...