Repository navigation
Getting Started
- Install Better Logic Library.
- Open its app settings in Homey and select Variables.
- Choose Add variable, enter
DoorCount, select Number, and add it. - Create a Flow with an event such as a door opening. Add BLL's
Increment number variable action, select
DoorCount, and enter1. - 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]
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.
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.
Support development - If Better Logic Library is useful to you, you can support its
continued development through GitHub Sponsors,
Patreon,
PayPal, or
bunq.
Thank you!