# \[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:** 20\
**Page:** 1

<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:** [October 21, 2023, 5:58pm UTC](https://community.homey.app/t/app-pro-custom-logic/92450/1 "2023-10-21T17:58:30Z")

</div>

![forum_banner (6)](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/e/ce4126c4a53955e41744333cc07ec4dad4f8a762.jpeg)

**Custom Logic for Homey**

**Custom Logic** is a Homey app that allows you to control your tokens and flows with ease.

 ![card_forum (1)](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/1/01316a90e1777e297c325f34f4b01c0dbc1ae5c4.png)

**[Download the most current live version in the Homey App Store!](https://homey.app/a/nl.lrvdlinden.custom-tokens/)**

**[Download the most current test version in the Homey App Store!](https://homey.app/a/nl.lrvdlinden.custom-tokens/test)**

**Currently has support for:**

**Action cards** (only for advanced flows)  
🎑 Image Display: Fetch and display images from a URL as tokens with the ‘temporary-image’ action card by providing the ‘imageUrl’ parameter.  
➕ Calculate: Evaluate mathematical expressions with the ‘calculate-float’ and ‘calculate-int’ action cards.  
📅 Days: Calculate number of days between 2 dates  
🔢 Random Numbers: Generate random numbers using ‘generate-random-number’ with defined ranges.  
🗓 Leap Year: Check for leap years with the ‘check-leap-year’ action card by providing the ‘year’ parameter.  
🏋️‍♂️ BMI Calculation: Calculate BMI with the ‘calculate-bmi’ action card using ‘weight’ and ‘height’ parameters.  
➕ Mathematical Operations: Perform calculations with operators (+, -, \*, /) using the ‘calculate’ action card with ‘number1’, ‘number2’, and ‘text’ (operator) parameters.  
🔢 Temporary Values: Store and retrieve temporary values (numbers, strings, URLs, and images) using ‘temporary-number’, ‘temporary-string’, ‘temporary-url’, and ‘temporary-image’ action cards.

**Condition cards**  
↗ Number Greater Than: Check if one number is greater than another with the ‘number\_greater\_than’ condition card. Provide ‘number’ and ‘number2’ parameters.  
↘ Number Less Than: Determine if one number is less than another using the ‘number\_less\_than’ condition card. Specify ‘number’ and ‘number2’ parameters.  
💬 Text Has Value: Verify if a text contains a specific value with the ‘text\_has\_value’ condition card. Use ‘text’ and ‘waarde’ parameters.  
💬 Text Has Exactly: Check if a text is exactly equal to a specified value using the ‘text\_has\_exactly’ condition card. Provide ‘text’ and ‘waarde’ parameters.  
🟰 Boolean Is Exactly: Determine if a boolean value is exactly equal to ‘true’ with the ‘boolean\_is\_exactly’ condition card. Provide the ‘boolean’ parameter.

⚙ Install **Custom Logic** app from the **Homey app store** and start creating **advanced** flows!

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/1/4/14467db3491c537eca0d138f6b6611f833ed7951.png)  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/d/7/d7f46614c2602d4c01aaebe34cc909c6753d6fd8.png)

💬 **Supported languages:**

🇬🇧 🇳🇱 🇩🇪 🇫🇷 🇮🇹 🇸🇪 🇳🇴 🇪🇸 🇩🇰 🇷🇺 🇵🇱

* * *

💻 **Apps made by @LRvdLinden**

* * *

See for more apps link below 👇🏻 or just open the pull down.

> [@Apps made by @LRvdLinden](https://community.homey.app/t/apps-made-by-lrvdlinden/85452/1):
>
> Click to expand

* * *

## Contributions

If you appreciate this apps, contribute to future development by making a [paypal contribution](https://lrvdlinden.app/donate.html)

or buy me a couple of 🍻 or a ☕ with [iDeal](https://lrvdlinden.app/donate.html) or [Bunq.me](https://lrvdlinden.app/donate.html) or become a surporter on [Patreon](https://lrvdlinden.app/donate.html)

* * *

---

<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:** [October 23, 2023, 8:07am UTC](https://community.homey.app/t/app-pro-custom-logic/92450/2 "2023-10-23T08:07:44Z")

</div>

✨ **Version 1.0.4**

New _ **Live** _ version!

**Changelog**  
**New** : First Release

**[Download the new version in the Homey App Store!](https://homey.app/a/nl.lrvdlinden.custom-tokens/test)**

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/1/4/14467db3491c537eca0d138f6b6611f833ed7951.png)  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/d/7/d7f46614c2602d4c01aaebe34cc909c6753d6fd8.png)

> **[Custom Logic](https://homey.app/en-us/app/nl.lrvdlinden.custom-tokens/Custom-Logic/)**
>
> All in one Logic app

* * *

If you find any **issues** , send a **report** via the mobile homey app

> More - apps - **Custom Logic** - settings wheel right top - send diagnostic report (put your email and issues in the input field to make it easier)

---

<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:** [October 23, 2023, 2:50pm UTC](https://community.homey.app/t/app-pro-custom-logic/92450/3 "2023-10-23T14:50:23Z")

</div>

✨ **Version 1.0.5**

New _ **Live** _ version!

**Changelog**  
**Fix** : Boolean condition card

**[Download the new version in the Homey App Store!](https://homey.app/a/nl.lrvdlinden.custom-tokens/test)**

> **[Custom Logic](https://homey.app/en-us/app/nl.lrvdlinden.custom-tokens/Custom-Logic/)**
>
> All in one Logic app

* * *

If you find any **issues** , send a **report** via the mobile homey app

> More - apps - **Custom Logic** - settings wheel right top - send diagnostic report (put your email and issues in the input field to make it easier)

---

<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:** [October 24, 2023, 2:03pm UTC](https://community.homey.app/t/app-pro-custom-logic/92450/4 "2023-10-24T14:03:21Z")

</div>

Bug reported via mobile app.  
Diagnostic report no.: 0f7b4565-1ba7-450a-ad08-8dc2de3bcb22

---

<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:** [October 24, 2023, 4:36pm UTC](https://community.homey.app/t/app-pro-custom-logic/92450/5 "2023-10-24T16:36:12Z")

</div>

✨ **Version 1.0.6**

New _ **test** _ version!

**Changelog**  
**Fix** : Fix action card to generate random number (@DirkG)

**[Download the new version in the Homey App Store!](https://homey.app/a/nl.lrvdlinden.custom-tokens/test)**

> **[Custom Logic](https://homey.app/en-us/app/nl.lrvdlinden.custom-tokens/Custom-Logic/)**
>
> All in one Logic app

* * *

If you find any **issues** , send a **report** via the mobile homey app

> More - apps - **Custom Logic** - settings wheel right top - send diagnostic report (put your email and issues in the input field to make it easier)

---

<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:** [March 14, 2024, 3:51pm UTC](https://community.homey.app/t/app-pro-custom-logic/92450/6 "2024-03-14T15:51:59Z")

</div>

Hi Léon,

any news about the bug with the “random number” flow card? It works perfektly with integral numbers, but not with decimals.

---

<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:** [March 14, 2024, 5:37pm UTC](https://community.homey.app/t/app-pro-custom-logic/92450/7 "2024-03-14T17:37:13Z")

</div>

Will check it soon (within a week).  
Strange story.

---

<div class="post-metadata">

**Author:** ![Kotick](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kotick/32/16570_2.png) [@Kotick](https://community.homey.app/u/Kotick)\
**Post date:** [September 1, 2024, 3:44pm UTC](https://community.homey.app/t/app-pro-custom-logic/92450/8 "2024-09-01T15:44:31Z")

</div>

Hello everyone,

I’m using the “Custom Logic” app on Homey to calculate the difference in days between two dates. The function works well, but I have a problem with the input date formats. I receive dates in two different formats: `dd/mm/yyyy` (e.g., 01/09/2024) and `yyyy/mm/dd` (e.g., 2024/09/01).

Is there a way in “Custom Logic” to automatically convert these dates to a single format (preferably `yyyy/mm/dd`) before calculating the difference in days? If not, is there a workaround or a script that could help achieve this?

Thank you in advance for any help or suggestions!

---

<div class="post-metadata">

**Author:** ![Willem\_E](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/willem_e/32/124227_2.png) [@Willem\_E](https://community.homey.app/u/Willem_E)\
**Post date:** [February 13, 2025, 2:07pm UTC](https://community.homey.app/t/app-pro-custom-logic/92450/9 "2025-02-13T14:07:27Z")

</div>

Good afternoon all,

I have been trying to get some calculations done in the advance flows using a number of apps and the standard logic flow.

however homey doesnt recognize any of the mathematical experssions, items like +, -. \*, / work fine but nothing a bit more specific like EXP(X) or LN(X).

in this case i get either 43 (so nothing as it is the anwser to everything) or in for example a custom logic app the error message that “exp(2) is not a mathemetical expression”, more simple formules adding, or extracting work without any problems.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/7/9/797950f8a2f52560d9e6e6e525afa24d8c6afbb9.png)

has anyone ran into something similair before?

---

<div class="post-metadata">

**Author:** ![SunBeech](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sunbeech/32/111391_2.png) [@SunBeech](https://community.homey.app/u/SunBeech)\
**Post date:** [February 13, 2025, 2:28pm UTC](https://community.homey.app/t/app-pro-custom-logic/92450/10 "2025-02-13T14:28:58Z")

</div>

Depending on the flow card try this:

- `math.exp(2)`
- `{{math.exp(2)}}`

---

<div class="post-metadata">

**Author:** ![Willem\_E](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/willem_e/32/124227_2.png) [@Willem\_E](https://community.homey.app/u/Willem_E)\
**Post date:** [February 13, 2025, 2:40pm UTC](https://community.homey.app/t/app-pro-custom-logic/92450/11 "2025-02-13T14:40:59Z")

</div>

Did try a couple of those already indeed;

same result for both variants again in different apps and the standard available logic flows.  
as per reference also inserted another formula which goes through just ok;

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/1/3/134d379a37d9108fd9c17e09eae62318545b307e.png)

---

<div class="post-metadata">

**Author:** ![SunBeech](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sunbeech/32/111391_2.png) [@SunBeech](https://community.homey.app/u/SunBeech)\
**Post date:** [February 13, 2025, 2:48pm UTC](https://community.homey.app/t/app-pro-custom-logic/92450/12 "2025-02-13T14:48:21Z")

</div>

I normally use the Better Logic Library app with its flow cards to perform calculations. Using the ‘calculate as tag’ card, the following expression works:

 ![IMG_1694](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/d/8/d82eec140eb252fc90ffcbb964f44053a92f1132.jpeg)

---

<div class="post-metadata">

**Author:** ![Willem\_E](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/willem_e/32/124227_2.png) [@Willem\_E](https://community.homey.app/u/Willem_E)\
**Post date:** [February 13, 2025, 3:27pm UTC](https://community.homey.app/t/app-pro-custom-logic/92450/13 "2025-02-13T15:27:38Z")

</div>

that worked! thanks for the help! (and time to get rid of the custom logic app ;))

---

<div class="post-metadata">

**Author:** ![Luigi\_Colancecco](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/luigi_colancecco/32/82268_2.png) [@Luigi\_Colancecco](https://community.homey.app/u/Luigi_Colancecco)\
**Post date:** [May 12, 2025, 9:46pm UTC](https://community.homey.app/t/app-pro-custom-logic/92450/14 "2025-05-12T21:46:53Z")

</div>

I’m not sure why this Flow doesn’t work, the Custom Logic THEN block goes red every time this flow is run

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/6/6/66c78cd2800412558a94086510e8d70450c68c29.png)

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [May 12, 2025, 11:50pm UTC](https://community.homey.app/t/app-pro-custom-logic/92450/15 "2025-05-12T23:50:12Z")

</div>

You don’t need that card, Luigi.  
You can enter the calculation right into both the notification cards and log card:  
(mind the double brackets around the calculation)

 ![1000048659](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/c/ccb90c5cdbbbe5fab46cf71c60fc89f298b37849.jpeg)

Or, when you still like to do the calculations up front, use the Better Logic card as shown by @SunBeech a few posts earlier. (no double brackets needed)

> [@\[APP\]\[Pro\] Custom Logic](https://community.homey.app/t/app-pro-custom-logic/92450/12):
>
> I normally use the Better Logic Library app with its flow cards to perform calculations. Using the ‘calculate as tag’ card, the following expression works:

 ![1000048661](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/e/7/e70e7fe62f1caea18a0df1de9a52d7ca7575cb5c.jpeg)

---

<div class="post-metadata">

**Author:** ![Luigi\_Colancecco](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/luigi_colancecco/32/82268_2.png) [@Luigi\_Colancecco](https://community.homey.app/u/Luigi_Colancecco)\
**Post date:** [May 14, 2025, 4:31pm UTC](https://community.homey.app/t/app-pro-custom-logic/92450/16 "2025-05-14T16:31:47Z")

</div>

I actually ended up doing it with the Better Logic app, but I didn’t know you could do that right in the notification card, that’s pretty cool, thank you!

---

<div class="post-metadata">

**Author:** ![DoctorBazinga](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/doctorbazinga/32/39686_2.png) [@DoctorBazinga](https://community.homey.app/u/DoctorBazinga)\
**Post date:** [January 27, 2026, 6:40pm UTC](https://community.homey.app/t/app-pro-custom-logic/92450/17 "2026-01-27T18:40:57Z")

</div>

Hi, how to make sure that the text as in put in the “tekst bevat Waarde” is converted to completly lower case or the case doesn’t matter. because now “weerbeeld bevat regen” is false but “weerbeeld bevat Regen” is true. (weerbeeld comes from knmi app for homey and weerbeeld is Regen).

Could you maybe automatically/internal convert it all(=both “tekst”and “waarde”) to lower case by your app.

Thank You.

---

<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 16, 2026, 12:46pm UTC](https://community.homey.app/t/app-pro-custom-logic/92450/18 "2026-05-16T12:46:58Z")

</div>

@LRvdLinden, has your app been removed from the App Store?

---

<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, 12:48pm UTC](https://community.homey.app/t/app-pro-custom-logic/92450/19 "2026-05-16T12:48:34Z")

</div>

Yes I pulled it back from the store

---

<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 16, 2026, 2:07pm UTC](https://community.homey.app/t/app-pro-custom-logic/92450/20 "2026-05-16T14:07:35Z")

</div>

Okay?! Why, if I may ask?

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