Smart (Components) Toolkit for Homey

Previously known as "Boolean Toolbox" - renamed to reflect expanded functionality beyond boolean logic

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.

v1.9.2 stable v1.10.0 test Homey 5.0+

Interactive Tools

Test and build your logic before deploying:

Device Types

Logic Device

The easiest way to create boolean logic with a visual pairing wizard.

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 →

Logic Unit

Powerful device for advanced users who need multiple formulas or prefer JSON configuration.

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 →

State Device

Capture and restore device states. Create "scenes" by storing the current state of multiple devices and applying them later with a single action.

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 →

State Capture Device

Dynamic state capture with templates, named slots, and push/pop stack operations.

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, dynamic state names with Homey tokens support, max 50 named states, max 20 stack depth per device.

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 →

Conditional Gates

Virtual "Go/No Go" circuits to pause and release flows based on logic states.

Wait condition Pause flow until Gate is Open (GO)
Persistence Gates remember their state until restarted
Control Open/Close gates from any flow

Read Conditional Gates guide →

Circadian Light Group

v1.10.0 TEST

Available in test channel only — stable channel still ships v1.9.2 without this device.

A virtual light device that automatically adjusts brightness and color temperature for a group of real lights based on time of day, sun position or ambient light, with optional red mode at night.

Schedule Per anchor: clock time, solar event (sunrise/sunset/golden hour/etc.) or lux sensor crossing
Profile Day / evening / night dim + temperature, plus red mode threshold
Outdoor source Astronomical / lux sensor / weather API / external value
Flow cards Pause-until-time/solar, force red, apply temporary state, phase-changed trigger, app-level solar event trigger and more

Key features: mix-and-match anchor modes per phase, polar fallback for high latitudes, smooth transitions, live tile status independent of on/off, per-light tweaks (prewarm, min/max dim, allow red).

Get the test version: homey.app/a/no.tiwas.booleantoolbox/test/

Read Circadian Light Group guide →

Waiter Gates

BETA

Experimental feature - Feedback welcome!

Waiter Gates let your flows pause and wait for device states to change, with YES/NO outputs.

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), Control waiter gate (action), Wait - simple delay (action).

Read Waiter Gates guide →

Evaluate Expression

A powerful flow card for range checking and value mapping with AND/OR logic. No device needed - use directly in your flows.

Input Any numeric value (e.g., temperature token)
Operators Comparison operators with AND/OR logic
Output Output value and error message tokens

Example: Check if temperature is comfortable (18-24°C) using rules 18,24 with operators AND .

Read Flow Cards reference →

Quick Start

1. Add a Device

Logic Device (recommended for beginners):

  • Go to DevicesAdd DeviceSmart (Components) ToolkitLogic 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.

2. Write Formulas (Logic devices)

[
  {
    "id": "formula_1",
    "name": "Motion & Dark",
    "expression": "A AND B",
    "enabled": true,
    "timeout": 60
  }
]

Operators: AND, OR, XOR, NOT (plus &, |, ^, !)

3. Use in Flows

WHEN: Formula [motion_detected] changed to TRUE
THEN: Turn on lights

Read complete setup guide →

Flow Cards

Triggers (WHEN)

  • Formula result changed to TRUE/FALSE
  • Formula timed out
  • State changed (Logic Device)
  • State was captured/applied (State Capture)

Conditions (AND)

  • Formula result is...
  • Formula has timed out
  • Gate is GO / NO GO (Conditional Gates)
  • Captured state exists (State Capture)
  • Stack is empty / depth is... (State Capture)
  • Wait until capability becomes value (Waiter Gates)

Actions (THEN)

  • Set input value for formula
  • Evaluate formula / Re-evaluate all
  • Evaluate expression (Range checking)
  • Apply state (State Device)
  • Capture/Apply/Push/Pop... (State Capture)
  • Modify Conditional Gate (Conditional Gates)
  • Wait for GO (Conditional Gates)
  • Control waiter gate (Waiter Gates)
  • Wait (Simple delay)

See all flow cards →

Key Features

Dynamic Input Expansion

Start with 2 inputs, grow to 10 automatically:

{"expression": "A AND B AND C AND D"}
// Device auto-expands to 4 inputs!

First Impression Mode

Lock inputs at first value for sequence-based logic:

{"firstImpression": true, "timeout": 30}

Multiple Independent Formulas

Each formula maintains its own input states (Logic Unit only):

[
  {"id": "day_mode", "expression": "A AND B"},
  {"id": "night_mode", "expression": "A OR B"}
]

JSON Auto-Formatting

Paste ugly JSON, get beautiful formatting on save. Works in all settings fields.

Documentation

Support & Community

If this app makes your life easier, consider buying me a coffee

Donate via PayPal

Created by Lars Kvanum (@Tiwas)

This app is provided as-is. Use at your own risk.