Skip to content

Miscellaneous flow cards

FlowBits also provides a collection of standalone utility flow cards.
These cards do not belong to a specific feature but offer useful tools you can use anywhere in your flows.
They cover math operations, context-aware checks, and probability-based logic.

Flow cards

These flow cards provide various utility functions that you can apply directly within any flow.

Actions

FlowBits
Calculate percentage between 07:00 and 22:00
Calculate the percentage of time elapsed between two timestamps. Useful for time-based interpolation and automation.
FlowBits
Increment Number by Step
Increment a number by the given step.
FlowBits
Decrement Number by Step
Decrement a number by the given step.
FlowBits
Multiply Number by Factor
Multiply a number by a factor.
FlowBits
Divide Number by Divisor
Divide a number by a divisor.
FlowBits
Make Number positive
Make a number positive.
FlowBits
Make Number negative
Make a number negative.
FlowBits
Round Number
Round a number to the nearest integer.
FlowBits
Round Number up
Round a number up to the nearest integer.
FlowBits
Round Number down
Round a number down to the nearest integer.
FlowBits
Round Number to Step
Round a number to the nearest step.
FlowBits
Calculate Formula
Evaluate a math formula. Supports +, -, *, /, %, ^ (power), parentheses, functions (abs, sqrt, log, ln, round, floor, ceil, min, max, sin, cos, tan, asin, acos, atan), and constants (pi, e). Use tags directly in the formula.

Conditions

FlowBits
It is Morning
Checks if the current day period is either morning, afternoon, evening or night.
FlowBits
It is Spring vacation in region Middle
Checks if it is currently a school holiday in the Netherlands. The region can either be North, Middle or South.
FlowBits
Continue with Chance% change
Continues with the given percentage chance.
FlowBits
Dice rolls Result
Rolls a dice and checks if the result is equal to the given number.
FlowBits
The moon phase is First Quarter
Checks the current moon phase.
FlowBits
The zodiac sign is Pisces
Checks the current zodiac sign.

Examples

Calculate percentage between timestamps

The percentage utility card calculates how far through a time period you currently are.
It takes two timestamps (in HH:mm format) and returns both a percentage (0-100) and a fraction (0-1).

Use cases:

  • Gradually adjust lighting brightness from sunrise to sunset
  • Create smooth transitions between day and night modes
  • Calculate dynamic thermostat offsets based on time of day
  • Interpolate between two values over a time period

Example: Between 07:00 and 22:00 (7 AM to 10 PM):

  • At 07:00, the percentage is 0%
  • At 14:30 (halfway through), the percentage is 50%
  • At 22:00, the percentage is 100%

If the "from" time is later than the "to" time, the card handles overnight periods automatically. For example, from 22:00 to 07:00 spans midnight correctly.

Calculate formula

The calculate card evaluates a math formula and returns the result as a token. You can use Homey tags directly in the formula field — they are resolved to numbers before evaluation.

Supported operators: +, -, *, /, % (modulo), ^ (power), and parentheses.

Supported functions:

FunctionDescriptionExample
absAbsolute valueabs(-5) → 5
sqrtSquare rootsqrt(16) → 4
logBase-10 logarithmlog(1000) → 3
lnNatural logarithmln(2.718) → ~1
roundRound to nearest integerround(3.7) → 4
floorRound downfloor(3.7) → 3
ceilRound upceil(3.2) → 4
minMinimum of valuesmin(3, 7, 1) → 1
maxMaximum of valuesmax(3, 7, 1) → 7
sinSine (radians)sin(pi / 2) → 1
cosCosine (radians)cos(0) → 1
tanTangent (radians)tan(pi / 4) → 1
asinArcsineasin(1) → π/2
acosArccosineacos(1) → 0
atanArctangentatan(1) → π/4

Constants: pi (3.14159…), e (2.71828…)

Functions can be nested, e.g. sqrt(abs(-9)) + 1 → 4.

Example formulas:

  • Temperature tag / 1.3 + 5 — convert a sensor value
  • max(0, min(100, Value tag)) — clamp a value between 0 and 100
  • round(Price tag * 1.21) — add 21% VAT and round