Variables
Variables are used to create adjustable values that can then be used as conditions in If Statements.
For example, a Bedtime variable can be created to indicate when the household has gone to sleep. A button press or automated event can be set to trigger the beginning and end of Bedtime. With If Statements, conditional actions can be set up to behave differently depending on if Bedtime is active or not. Actions such as TV On or Lights On can be configured to keep the light and volume levels low during Bedtime.
Note: Variables alone do not have any function. Create actions or events to set the state of the variable and then use If Statements to create sequences that perform different actions based on the state of that variable. For instructions on If Statements, refer to Add an If StatementAdd an If Statement.
Create a Variable
To create a variable:
-
Tap Variables.

-
Tap
.
-
Enter a name for the variable and tap a type:
-
True/False: Use for variables with only two states, such as a mode being on (True) or off (False).
-
Number: Use for variables that track the state of a numerical value.
-
Text: Use for any other variables.
Note: The Type selections are used to categorize the variable and to capture its available states within the UI. Selecting a type is for informational purposes only and does not apply any programming logic to the variable.
-
-
Add additional states for the variable as by tapping Add State and entering a friendly Name and Value for the new state. Unwanted states can be deleted by selecting the
.NoteS:
-
The Name and Value fields are used to label the different states for a variable. Using the example above, Bedtime can be one of many states created for a single Text variable. Creating additional states is for informational purposes only and does not apply any programming logic to the variable.
-
True/False variables only have two states: True and False. The values cannot be changed.
-
-
Select a variable to be the default value by tapping the variable and then tapping Set As Default. Tap the Apply default value on system startup checkbox to force the variable to that value upon a system reboot. If Apply default value on system startup is not checked, the state of the variable will persist through a reboot.
Created variables appear in the list of Sequence actions.