If you’re an app developer and want to integrate Better Logic Library or support BLL coding in your app, see the Better Logic Library – For Developers topic.
Better Logic Library
Manage variables, add advanced logic to your Flows, and use reusable expressions in supported apps.
Install Better Logic Library · User manual · Source code
Better Logic Library manual & guides
New to BLL, or looking for a specific feature? Start with the official Wiki.
Find instructions for variables, Flow cards, devices, BLL coding, examples, formatting, settings and integrations.
Open the Better Logic Library manual
New users: Getting started
What can you do with BLL?
- Create and manage named variables, and use them in Flows.
- Use Flow cards for variable triggers, conditions, actions and calculations.
- Pair BitFlip, NumSlide and Trigger devices with BLL variables.
- Use BLL expressions, custom functions and formatting tools.
- Use libraries such as Math.js and Lodash in BLL expressions.
- Export and format data, and provide temporary file downloads through the BLL File Server.
- Use BLL APIs and shared libraries from other apps.
Getting started
- Install Better Logic Library.
- Open the app’s settings and create a variable.
- Add a BLL Flow card, such as Increment number variable, to a Flow.
- Save and run the Flow, then check the variable in app settings.
Follow the Getting started guide for a step-by-step example.
BLL coding
In a text field that explicitly supports BLL coding, put an expression inside {[ ]}. For example, this FTP Client filename adds the current date:
snapshot-{[ date("yyyy-MM-dd") ]}.jpg
BLL coding is field-specific: the app and the particular field must support decoding. It does not work automatically in every Homey text field. See BLL coding and the supported apps guide.
The FTP Client guide includes this community example of a BLL expression in a Save Image Token Flow:

Community example: a BLL date expression is used in the filename.
The resulting image file.
Documentation & guides
| What would you like to do? | Guide |
|---|---|
| Create your first variable and Flow | Getting started |
| Create, edit, export or restore variables | Variables |
| Browse Flow cards | Flows |
| Add a BitFlip, NumSlide or Trigger device | Devices |
| Write expressions or dynamic text | BLL coding |
| Find practical examples | BLL examples |
| Format dates, times or numbers | Formatting |
| Configure app settings and the File Server | App settings |
| Check whether another app supports BLL coding | Supported apps |
| Use BLL from another app or HomeyScript | API · Developer guide |
| Troubleshoot a problem | Troubleshooting |
Support and feature requests
Questions and examples are welcome in this topic.
Please report bugs and submit feature requests on GitHub Issues.
Apps
Support development
Enjoying Better Logic Library? Donations and sponsorship help support continued development. Thank you!














