Adding a daytime variable to Fibaro HC

When you are programming your scenes within Fibaro HC 2 or Lite, you may probably wanted to know what part of day it is (i.e. to turn on a light when no light detector is available).

Within Fibaro it is quite easy to define variables. These can be used throughout the scenes and makes it possible to react on certain times or situations.

Adding a predefined variable

Adding a predefined variable is pretty straight forward and can be done in the panels section.

Add a predefined variable
Add a predefined variable

When done, save and close the panel. Don’t forget to initially set the variable to the correct part of day.

Create scenes

To actually change the variable, we need to create scenes. In our case we have defined two possible situations, i.e. ‘after sunrise‘ and ‘after sunset’.

Make sure to check the box “Start when Home Center 2/Lite starts”. After creating the scenes, the variable will be updated corresponding the part of day.

An working example

In our situation we created a real live situation, which works pretty well in our case.

As we don’t have a light detection at a certain section within the house, or if we don’t want to do direct association, we turn on the light when our variable holds the value “After sunset” and a trigger is breached:

Turn on a light when daypart is "After sunset"
Turn on a light when daypart is “After sunset”