Skip to content

Getting Started

Arie J. Godschalk edited this page Nov 15, 2026 · 2 revisions

Getting started

Home · Variables · Flows

Create your first variable

  1. Install Better Logic Library.
  2. Open its app settings in Homey and select Variables.
  3. Choose Add variable, enter DoorCount, select Number, and add it.
  4. Create a Flow with an event such as a door opening. Add BLL's Increment number variable action, select DoorCount, and enter 1.
  5. Save and run the Flow. Check the value in app settings.

The order is door event → increment DoorCount by 1. The action changes the variable before the next card runs.

flowchart TD
  A[Door opens] --> B[Increment DoorCount by 1]
  B --> C[Check DoorCount in Variables settings]
Loading

To react to the count, create another Flow using A variable changed and select DoorCount. Add a Greater than condition if you only want to act above a threshold. A variable set to the same value does not count as changed; use A variable is set when you need both cases.

You can also create a variable from a compatible typed Flow card: type its name in the variable selector, select the create option, and save the Flow. These automatically created variables have a different lifecycle from variables created in settings. Read Variables before removing cards.

Try dynamic text

In BLL's Execute Text (as Tag) action, enter:

Hello, today is {[ date("dddd") ]}.

Use the action's resulting text tag in a later card. The weekday depends on the configured locale. The same {[ ... ]} syntax works directly in text fields that a supporting app explicitly decodes. It does not work automatically in every Homey text field.

For a calculation without surrounding text, use Execute BLL-expression (as Tag) with 2 + 3 and use the number tag. Do not include {[ ]} in an expression-only card. See BLL coding for the differences.

Next steps

Clone this wiki locally