Name Change: This app was previously known as "Boolean Toolbox". The name was changed to "Smart (Components) Toolkit" to better reflect the expanded functionality beyond just boolean logic - now including state management, scene control, and flow utilities.
๐ Full Documentation: https://tiwas.github.io/SmartComponentsToolkit/
Advanced logic and state management for your Homey automations. Create smart devices that react to multiple inputs with customizable formulas, and manage device states with powerful capture/restore functionality.
Test and build your logic before deploying:
- Boolean Logic Emulator - Test expressions with live truth tables
- Formula Builder - Visual formula editor with validation
- Boolean Editor - Advanced editor for boolean device configurations
- State Editor - Visual editor for State Device configurations
- State Editor (API) - State editor with Homey API integration (eternal beta)
The easiest way to create boolean logic with a visual pairing wizard.
| Feature | Description |
|---|---|
| Setup | Visual pairing wizard - select zone โ device โ capability |
| Inputs | Dynamic (2-10, auto-expands based on formula) |
| Formulas | Single formula per device |
| Best for | Simple setups, beginners |
๐ Read Logic Device guide โ
Powerful device for advanced users who need multiple formulas or prefer JSON configuration.
| Feature | Description |
|---|---|
| Setup | Quick add with manual JSON configuration |
| Inputs | Dynamic (2-10, auto-expands based on formula) |
| Formulas | Multiple independent formulas per device |
| Best for | Advanced users, multi-formula needs |
Note: Logic Unit X (2, 3, 4...10 inputs) are legacy devices with fixed input counts - use the new Logic Unit instead.
๐ Read Logic Unit guide โ
Capture and restore device states. Create "scenes" by storing the current state of multiple devices and applying them later with a single action.
| Feature | Description |
|---|---|
| Setup | Visual pairing wizard - select zones and devices |
| Values | Fixed at setup time |
| Use case | Predefined scenes (Movie Night, Cleaning, etc.) |
Key features:
- Capture current state of multiple devices across zones
- Apply stored state with a single flow action
- "Reset All" option to turn off other State Devices first
- Hierarchical execution with configurable delays
๐ Read State Device guide โ
Dynamic state capture with templates, named slots, and push/pop stack operations.
| Feature | Description |
|---|---|
| Setup | Visual pairing wizard - define template of devices/capabilities |
| Values | Captured at runtime (not fixed) |
| Named states | Store multiple named snapshots |
| Stack | Push/pop for temporary state management |
Key features:
- Capture current device states to named slots at runtime
- Push/pop stack for temporary state changes (e.g., doorbell interruption)
- Dynamic state names with Homey tokens support
- Max 50 named states, max 20 stack depth per device
Example use case:
WHEN: Doorbell rings
THEN: Push current state to stack
THEN: Set all lights to 100%
THEN: Wait 5 minutes
THEN: Pop state (restore previous)
๐ Read State Capture Device guide โ
Waiter Gates let your flows pause and wait for device states to change, with YES/NO outputs:
| Feature | Description |
|---|---|
| Wait condition | Pause flow until device capability reaches target value |
| YES path | Value matches (or already matched) |
| NO path | Timeout expired before match |
Flow Cards:
- Wait until device capability becomes value (condition) - Waits with timeout
- Control waiter gate (action) - Enable/disable/stop a waiter by ID
- Wait (action) - Simple delay (basic pause without device monitoring)
๐ Read Waiter Gates guide โ
Logic Device (recommended for beginners):
- Go to Devices โ Add Device โ Smart (Components) Toolkit โ Logic Device
- Follow the pairing wizard to select inputs
- Configure formula in device settings
Other devices:
- Logic Unit, State Device, State Capture Device - same process, different wizards
[
{
"id": "formula_1",
"name": "Motion & Dark",
"expression": "A AND B",
"enabled": true,
"timeout": 60
}
]Operators: AND, OR, XOR, NOT (plus &, |, ^, !)
WHEN: Formula [motion_detected] changed to TRUE
THEN: Turn on lights
๐ Read complete setup guide โ
- Formula result changed to TRUE/FALSE
- Formula timed out
- State changed (Logic Device only)
- State was captured/applied (State Capture Device)
- Formula result is...
- Formula has timed out
- Captured state exists (State Capture Device)
- Stack is empty / Stack depth is... (State Capture Device)
- Wait until device capability becomes value (Waiter Gates - BETA)
- Set input value for formula
- Evaluate formula / Re-evaluate all
- Apply state (State Device)
- Capture/Apply/Delete state, Push/Pop/Peek/Clear stack (State Capture Device)
- Control waiter gate (Waiter Gates - BETA)
- Wait (Simple delay)
Start with 2 inputs, grow to 10 automatically:
{"expression": "A AND B AND C AND D"}
// Device auto-expands to 4 inputs!Lock inputs at first value for sequence-based logic:
{"firstImpression": true, "timeout": 30}Each formula maintains its own input states:
[
{"id": "day_mode", "expression": "A AND B"},
{"id": "night_mode", "expression": "A OR B"}
]Paste ugly JSON, get beautiful formatting on save. Works in all settings fields.
- Getting Started
- Device Types Guide
- State Device
- State Capture Device
- Waiter Gates (BETA)
- Flow Cards Reference
- Changelog
- Forum: Homey Community
- Issues: GitHub Issues
- Source: GitHub Repository
If this app makes your life easier, consider buying me a coffee โ
Created by Lars Kvanum (@Tiwas)
This app is provided as-is. Use at your own risk.
Smart (Components) Toolkit - Smarter automations with advanced logic and state management ๐