You are using an unsupported browser. Please update your browser to the latest version on or before July 31, 2020.
close
Home > ZZB97 Z-Box Hub > Z-Box Software > Scenes and Automation > How to Create a Scene Using Enumerated Variables on Your Z-Box Hub
How to Create a Scene Using Enumerated Variables on Your Z-Box Hub
print icon

The variables panel can allow you to create more advanced home automations and scenes. It enables you to add, change, and check the status of global variables that can be used in your scenes. The greatest benefit of the variable is that if you want to reuse complex trigger conditions across multiple scenes, you define the condition as a variable only once, and then you can use your variable as a trigger with different scenes. 

 

The enumerated variable has set values, and they are configured when you create the variable. As a result the variable can be set only to the predefined values. Examples of Predefined Variables are Day/Night and Home/Away/Vacation. 
 

Sample Scene #1: Changing lights' brightness levels depending on the weather.
 

Scene Description: Every time the front door state changes to open, check the weather and time conditions to see what should be the light brightness level. 
Conditions are:

  • The weather is clear and it is between 5:00 pm - 11:00 pm, set the light level to 30%
  • The weather is cloudy and it is between 3:00 pm - 11:00 pm, set the light level to 50%
  • The weather is rainy, and it is between 3:00 pm - 11:00 pm, set the light level to 70%
  • Any other weather condition, keep the light off
     

1. First, you will have to define your variable for all 4 states. From the sidebar navigation menu of the Z-Box web interface, go to Settings.
 

 

2. Click on General

 

 

3. Click on Variables.

 

 

4. Click on Add Variable.

 

 

5. Click on the Enumerated variable.

 

 

6. Name your variable.

 

 

7. Provide the first variable value and then proceed to provide the names of all remaining values by clicking on Add Value for each additional variable.
For this example we will use the following names:

  • Clear (The weather is clear and it is between 5:00 pm - 11:00 pm, set the light level to 30%)
  • Cloudy (The weather is cloudy and it is between 3:00 pm - 11:00 pm, set the light level to 50%)
  • Rainy (The weather is rainy, and it is between 3:00 pm - 11:00 pm, set the light level to 70%)
  • OFF (Any other weather state keep the light off)

 

 

8. Once you provide all the values click on Add to create/save the variable. 

 

 

Now that you have your variable defined you will have to create scenes to assign weather-based and time-based triggers or conditions to each variable value. 

 

9. Create a block scene by navigating to Settings > Scene > Add Scene > Block Scene. Provide your basic scene information for the first variable and click Save. The below example illustrates that when the weather is clear and the time is between 5:00 pm and 11:00 pm, the variable is set to Clear.
 

 

 

10. Next, repeat the above steps to create three additional scenes for Cloudy, Rainy, and OFF variables. 

 

 

 

 

Now you are ready to create a scene that uses your variables as triggers. The below example shows how to create a scene based on the clear variable: Every time the front door is opened, check the condition: the weather is clear and it is between 5:00 pm - 11:00 pm. If the condition is met, set the light level to 30%.

 

10. To create your scene, navigate to Settings > Scenes to add a new scene, and specify the triggers and conditions. 

 

 

11. Next, add the action by dragging it to the Action section. When done defining the triggers and actions, click Save to create the scene. 

 

 

Proceed to create the remaining scenes (Cloudy, Rainy, OFF)  based on the variable values and other triggers. 


Tip: Since Clear, Cloudy, Rainy, and OFF scenes are only defining variable’s rules, we recommend hiding them from the scene view. To hide the scene from the UI, select the scene you want to hide to be redirected to the Scene Basic configuration menu.

 

 

 

Next, check the box next to Scene Hidden, scroll down, and click Save. The scene will be removed from your view. Hiding the scene does not affect the way it runs. 
 

 

To see all Hidden Scenes, from the Scene Setting menu, click on Filters and then select Hidden.

 

 

 

 

Please don't hesitate to reach out to us with any questions you may have!

Feedback
1 out of 1 found this helpful

scroll to top icon