# \[APP\]\[Pro\] Custom Logic

**URL:** <https://community.homey.app/t/app-pro-custom-logic/92450>\
**Category:** Apps\
**Tags:** app, tools, flow, homey-pro, advancedflow\
**Created:** [October 21, 2023, 5:58pm UTC](https://community.homey.app/t/app-pro-custom-logic/92450 "2023-10-21T17:58:30Z")\
**Posts on this page:** 3\
**Page:** 2

<div class="post-metadata">

**Author:** ![LRvdLinden](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/lrvdlinden/32/80786_2.png) [@LRvdLinden](https://community.homey.app/u/LRvdLinden)\
**Post date:** [May 16, 2026, 2:21pm UTC](https://community.homey.app/t/app-pro-custom-logic/92450/21 "2026-05-16T14:21:09Z")

</div>

If you installed the app, you can still use it.

---

<div class="post-metadata">

**Author:** ![LRvdLinden](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/lrvdlinden/32/80786_2.png) [@LRvdLinden](https://community.homey.app/u/LRvdLinden)\
**Post date:** [May 22, 2026, 7:15am UTC](https://community.homey.app/t/app-pro-custom-logic/92450/22 "2026-05-22T07:15:37Z")

</div>

# Custom Logic – Changelog

## v2.0.0 - 2.0.2 – Advanced Tokens & Supercharged Calculations

### New: Token System

- Added persistent advanced tokens
- Added dynamic token namespaces
- Added token existence checks
- Added token delete support
- Added token change triggers
- Added reactive/computed tokens
- Added token expression matching

### New Flow Cards

#### Triggers

- Token changed
- Number above threshold
- Number below threshold

#### Conditions

- Token exists
- Token expression is true
- Number is greater than
- Number is less than
- Text contains value
- Text exactly equals

#### Actions

- Set token
- Get token
- Delete token
- Compute token
- Advanced calculate

### Supercharged Calculation Engine

Added support for:

- Regex
- Arrays
- Objects
- JSON parsing
- Date math
- Timezone handling
- Statistical calculations
- Trigonometry
- Logarithms
- Unit conversion
- Random functions
- Nested expressions
- Expression evaluation
- Boolean logic
- Conditional expressions
- Advanced math operations

### Examples

#### Basic Math

```auto
1 + 1

```

```auto
(10 * 5) / 2

```

```auto
pow(2, 8)

```

```auto
sqrt(144)

```

#### Statistical Functions

```auto
sum([1,2,3,4,5])

```

```auto
avg([10,20,30])

```

```auto
median([1,5,9,10])

```

```auto
min([5,2,9])

```

```auto
max([5,2,9])

```

#### Trigonometry

```auto
sin(90)

```

```auto
cos(45)

```

```auto
tan(180)

```

#### Logarithms

```auto
log(100)

```

```auto
ln(10)

```

#### Random Functions

```auto
random(1,100)

```

#### Arrays & Objects

```auto
[1,2,3,4]

```

```auto
{"name":"Homey","version":2}

```

#### JSON Parsing

```auto
json('{"temperature":22}')

```

#### Regex

```auto
regex('hello123', '[0-9]+')

```

```auto
regex('test@email.com', '^[^@]+@[^@]+\.[^@]+

```

#### Date Math

```auto
daysBetween('2025-01-01','2025-12-31')

```

```auto
addDays(now(), 7)

```

```auto
formatDate(now(), 'YYYY-MM-DD')

```

#### Timezones

```auto
timezone('Europe/Amsterdam')

```

```auto
convertTimezone(now(), 'UTC', 'Europe/Amsterdam')

```

#### Token Examples

```auto
token('energy.today')

```

```auto
token('energy.today') > 5

```

```auto
token('weather.temperature') < 0

```

```auto
token('house.mode') == 'away'

```

#### Boolean Logic

```auto
true && false

```

```auto
(5 > 2) && (10 < 20)

```

#### Conditional Expressions

```auto
if(temperature > 20, 'warm', 'cold')

```

#### Unit Conversion

```auto
convert(100, 'cm', 'm')

```

```auto
convert(5, 'km', 'mi')

```

#### Advanced Examples

```auto
avg([
  token('sensor.livingroom'),
  token('sensor.kitchen'),
  token('sensor.office')
])

```

```auto
if(token('energy.today') > 10, 'high usage', 'normal usage')

```

```auto
regex(token('alarm.message'), 'error|warning')

```

```auto
sum([
  token('solar.today'),
  token('battery.output')
]) - token('house.usage')

```

### Fixes

- Fixed missing FlowCard handlers
- Fixed Homey publish validation errors
- Fixed TypeScript build issues
- Fixed runtime operator parsing
- Fixed token title naming
- Fixed FlowCard placeholders
- Fixed install/build packaging
- Removed broken cached build folders
- Improved Homey compatibility

---

<div class="post-metadata">

**Author:** ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)\
**Post date:** [May 22, 2026, 10:18am UTC](https://community.homey.app/t/app-pro-custom-logic/92450/23 "2026-05-22T10:18:32Z")

</div>

Will the app be re-released in the Homey App Store? I no longer have it installed.

[Previous page](https://community.homey.app/t/app-pro-custom-logic/92450.md?page=1)
