# \[APP\]\[Pro\] Better Logic Library - For Users

**URL:** <https://community.homey.app/t/app-pro-better-logic-library-for-users/71876>\
**Category:** Apps\
**Tags:** app, tools, homey-pro, logic, bll\
**Created:** [November 7, 2022, 10:13pm UTC](https://community.homey.app/t/app-pro-better-logic-library-for-users/71876 "2022-11-07T22:13:40Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arie\_J\_Godschalk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arie_j_godschalk/32/63027_2.png) [@Arie\_J\_Godschalk](https://community.homey.app/u/Arie_J_Godschalk)\
**Post date:** [November 7, 2022, 10:13pm UTC](https://community.homey.app/t/app-pro-better-logic-library-for-users/71876/1 "2022-11-07T22:13:41Z")

</div>

_If you are an App Developer and want to know more about how to include this into your App or how to let your App support BLL coding, goto the [[APP][Pro] Better Logic Library - For Developers](https://community.homey.app/t/app-pro-better-logic-library-for-developers/71761) Forum Topic._

This Topic describes the app for Users.

## Homey’s first real Library: Better Logic Library!

Welcome to the Better Logic Library.

An advanced logic library with variable and library management for Homey.

This apps supplies your Homey with Better Logic and Libraries:

- Variable management in a smart, integrated way.
- Advanced action- and conditioncards with Better Logic, like Math.js.
- Devices to directly manage the variables.
- Datetime formatting, fully customisable, shared with other apps.
- BLL coding and BLL expressions to use directly within other apps flowcards.
- Custom functions to use within BLL coding and BLL expressions.
- Libraries to use within BLL coding and BLL expressions, like Math.js and Lodash.
- A File Server that can be consumed by other apps, like Simple (Sys) LOG, to serve files on you LAN or to download them on the Homey Mobile App or the Developertools.
- Libraries for other Apps to consume, reducing app sizes and redundancies and improving management.
- APIs for variable management, using the File Server or other BLL functions.

Check out the (new) App Settings for all features and explanations, like BLL coding in supported apps!

# BLL Coding

Within all flowcards that supports BLL coding, you can add any BLL expression within the next codeblock: `{[expression]}`.  
You can use this f.i. within the Save Image Token flowcard from the [FTP Client App](https://homey.app/a/nl.qluster-it.FtpClient/)  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/b/cbdf7a46238eb6597776874ea66ce83adf3b2e2f.png)

This image will be saved with the custom timestamp the user writes himself:

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/8/8/889b0386b12e500698969d8146bc9afec2dae9d0.png)

Old Topic:  
**[[APP][Pro] Better Logic Library - Just some better logic, variable and library management](https://community.homey.app/t/app-pro-better-logic-library-just-some-better-logic-variable-and-library-management/5568)**

### Apps:

> [@\[Profile\] Arie J. Godschalk](https://community.homey.app/t/profile-arie-j-godschalk/70663/2):
>
> Apps developed or maintained by me: [Advanced Triggers](https://community.homey.app/t/app-pro-advanced-triggers-trigger-and-action-cards-with-eventname-for-advanced-flows/65651) , [BeNext](https://community.homey.app/t/app-pro-benext-benext-devices-for-homey/76104) , [Better Logic](https://community.homey.app/t/app-pro-better-logic-just-some-better-logic-and-variable-management/5568) , [Chronograph](https://community.homey.app/t/app-pro-chronograph-adds-precise-timer-stopwatch-and-transition-functionality-to-homey/18214) , [Device Capabilities](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287) , [Advanced Virtual Device](https://community.homey.app/t/app-pro-advanced-virtual-device-device-capabilities-app-with-unique-text-status-indicator/68198) , [FTP Client](https://community.homey.app/t/app-pro-ftp-client/70876) , [Google Services](https://community.homey.app/t/google-services-app-for-translate-and-new-text-to-speech-for-any-device-with-url-input/43257) , [Homesh Controller](https://community.homey.app/t/app-pro-homesh-controller-homesh-satellite-connect-homey-pro-2023-to-homey-pro-for-led-speaker-zwave-satellite-and-network-resource/70369) , [Homesh Satellite](https://community.homey.app/t/app-pro-homesh-controller-homesh-satellite-connect-homey-pro-2023-to-homey-pro-for-led-speaker-zwave-satellite-and-network-resource/70369) , [JSON Handler and Manipulator](https://community.homey.app/t/app-pro-json-handler-and-manipulator/66317) , [LOQED](https://community.homey.app/t/app-pro-loqed-your-personal-doorman/89816) , [Music Url Converter](https://community.homey.app/t/music-url-converter-play-music-urls-on-homey-bigger-then-900-kb/43546) , [Simple Log](https://community.homey.app/t/simple-log-app/146) , [Universal Media Player](https://community.homey.app/t/universal-media-player-a-generic-storages-place-for-your-homey-speakers-tvs-or-other-media-devices/43450) and [Virtual Devices](https://community.homey.app/t/app-pro-virtual-devices-virtual-devices-to-simulate-1-or-more-real-devices/1723) . [Goto profile of Arie J. Godschalk](https://community.homey.app/t/profile-arie-j-godschalk/70663) for more …

### Donations or Sponsorship

> [@\[Profile\] Arie J. Godschalk](https://community.homey.app/t/profile-arie-j-godschalk/70663/3):
>
> Donations or Sponsorship. You can help with the development, maintenance and support for the Apps, by donating or becoming a sponsor. This would be much appreciated! The more donations i receive, the more time i can make free for development and support. slight_smileDonations can be done through: [[PP] PayPal](https://paypal.me/QlusterIT) Requires a PayPal account. [[GS] Github Sponsors](https://github.com/sponsors/XeroxQ) Allowes for CreditCard. Sponsorships can be done through: [[P] Patreon](https://www.patreon.com/QlusterIT/membership) Requires a Patreon account. [[GS] Github Sponsors](https://github.com/sponsors/XeroxQ) …

---

<div class="post-metadata">

**Author:** ![Arie\_J\_Godschalk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arie_j_godschalk/32/63027_2.png) [@Arie\_J\_Godschalk](https://community.homey.app/u/Arie_J_Godschalk)\
**Post date:** [November 7, 2022, 10:13pm UTC](https://community.homey.app/t/app-pro-better-logic-library-for-users/71876/2 "2022-11-07T22:13:48Z")

</div>

# App Settings

Here is a description about the new App Settings in the Better Logic Library App.

## Variables

Here you can add, edit and delete variables.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/5/a/5a210d000681608a58fd1aebff2aaece8f168276.png)

To add a new variable, click on Add variable to open the new variable card.

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

## Coding

Here you can see how to use coding and try examples.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/a/5/a5eaef999de43d08c376830a8a6628cef42af2ae.png)

Click on the Example (eye) to show the usages down below, which is also shown in Locale/TimeZone by default.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/4/048321b08a47e9c6438718867efea27c0bc60f64.png)

## Locale/TimeZone

Here you can configure the locale or language and timezone to use by default for coding.

- Within coding you can always define a locale or timezone.

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

## Formats

Here you can alter the definition of any default datetime formats for the default locale.  
This will be applied to every app using the BLL coding or DateTime.

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

## Functions

Here you can add functions that you can use in expressions and BLL coding.

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

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/1/d/1d3f91001145391914146164046bad969cecfc6d.jpeg)

---

<div class="post-metadata">

**Author:** ![Arie\_J\_Godschalk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arie_j_godschalk/32/63027_2.png) [@Arie\_J\_Godschalk](https://community.homey.app/u/Arie_J_Godschalk)\
**Post date:** [November 7, 2022, 10:13pm UTC](https://community.homey.app/t/app-pro-better-logic-library-for-users/71876/3 "2022-11-07T22:13:55Z")

</div>

# BLL Coding

BLL codings are expressions within text-arguments in flowcards.  
In every App that supports BLL coding, for each text-argument in flowcards that goes through the BLL decoder, you can use `{[expression]}` .

Within these expressions, you can use build-in modules, functions and your own customisable functions.

## Modules

- \_  
Lodash 4.17.21
- math  
Math.js 11.3.3

Example  
`The last one is: {[_.last(["1", "2"]) ]}.`  
Result:  
The last one is: 2.

## Build-in functions

`date(format, date?, locale?, timeZone?)`  
This method will return the current date(time) in the entered format, with respect to the user defined locale (language) en timezone.  
Optionally you can supply the date(time), locale and/or timeZone.

Example  
`Today is a {[date("dddd")]}`  
Result:  
Today is a donderdag

# Date codings:

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/1/8/1823cdc0d4539b6ce854a796e1681d433a1d0afe.png)  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/b/f/bfe95cd79f3f77af981a23673f9fba40d293c615.png)  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/8/3/83214128c1cb757c725bcd99fb2bd4ea3f145a91.png)

---

<div class="post-metadata">

**Author:** ![Arie\_J\_Godschalk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arie_j_godschalk/32/63027_2.png) [@Arie\_J\_Godschalk](https://community.homey.app/u/Arie_J_Godschalk)\
**Post date:** [November 7, 2022, 10:14pm UTC](https://community.homey.app/t/app-pro-better-logic-library-for-users/71876/4 "2022-11-07T22:14:04Z")

</div>

### Apps that support BBL coding in (certain) flowcards:

### Better Logic Library

BLL coding, see the App settings to get a better view on what that is and how to use it.

> [@\[APP\]\[Pro\] Better Logic Library - For Users](https://community.homey.app/t/app-pro-better-logic-library-for-users/71876/2):
>
> App Settings Here is a description about the new App Settings in the Better Logic Library App. Variables Here you can add, edit and delete variables. To add a new variable, click on Add variable to open the new variable card. Coding Here you can see how to use coding and try examples. Click on the Example (eye) to show the usages down below, which is also shown in Locale/TimeZone by default. Locale/TimeZone Here you can configure the locale or languag…

### Device Capabilities

Device Capabilities supports BLL coding in Set Text and Set Status text-arguments, in the Set field to BLL Expression and ofc in AVD Reflection.

> [@\[APP\]\[Pro\] Device Capabilities - Enhance the capabilities of devices](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287):
>
> If you have questions about the App Device Capabilities or seek help with an Flow or with the Flow Exchanger, please see the [Device Capabilities Topic](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287). This topic! [German](https://community.homey.app/t/the-flow-exchange-r-helfen-und-fragen-stellen/69807)[Another German topic](https://community.homey.app/t/device-capabilities/67934)[English](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287) If you have questions about the Advanced Virtual Device or seek help with the Exchanger File, please see the [Advanced Virtual Devices Topic](https://community.homey.app/t/app-pro-device-capabilities-addendum-fully-customisable-advanced-virtual-device-with-unique-text-status-indicator/68198). [German](https://community.homey.app/t/teilen-sie-ihr-gerat-erweiterte-virtuelle-gerate-aus-den-geratefahigkeiten/69583)[English](https://community.homey.app/t/app-pro-device-capabilities-addendum-fully-customisable-advanced-virtual-device-with-unique-text-status-indicator/68198) If you want to post a AVD as a Template for others to use, please post it on [Share Your Device! - Advanced Virtual Devices](https://community.homey.app/t/share-your-device-advanced-virtual-devices-from-device-capabilities/68676). [Germa…](https://community.homey.app/t/teilen-sie-ihr-gerat-erweiterte-virtuelle-gerate-aus-den-geratefahigkeiten/69583)

### FTP Client

FTP client supports BLL coding in all it’s text-arguments, like saving an image to FTP:

> [@\[APP\]\[Pro\] FTP Client - Control FTP Servers through a directory-based UI in the Homey App or Web App](https://community.homey.app/t/app-pro-ftp-client-control-ftp-servers-through-a-directory-based-ui-in-the-homey-app-or-web-app/70876/106):
>
> New in [FTP Client test](https://homey.app/nl-nl/app/nl.qluster-it.FtpClient/FTP-Client/test/). BLL coding support: Example 1 [image] This will result in the file: Example 2 [image] This will result in the file: Other coding Or you can use other datecodings, see the BLL Users Topic for more information on coding.

### Google Services

Google Services supports BLL coding in all it’s text-arguments, like Start saying […]:

> [@\[APP\]\[Pro\] Google Services - App for Translate and new Text-to-Speech for any device with url input](https://community.homey.app/t/app-pro-google-services-app-for-translate-and-new-text-to-speech-for-any-device-with-url-input/43257/357):
>
> New in [Google Services test](https://homey.app/a/nl.qluster-it.GoogleServices/test/). BLL coding support: Example 1 This will result in a Afrikaans voice saying (in Afrikaans): “Hello there, today it is thursday 10 november 2022.” The date is automaticly build upon the selected voice-language. Example 2 [image] This will result in a Dutch voice saying (in Dutch): “Hello there, today it is thursday 10 november 2022.” Example 3 [image] This will result in a Dutch voice saying (in Dutch): “Hallo daar, vandaag is het donderdag 10 november …

---

<div class="post-metadata">

**Author:** ![Arie\_J\_Godschalk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arie_j_godschalk/32/63027_2.png) [@Arie\_J\_Godschalk](https://community.homey.app/u/Arie_J_Godschalk)\
**Post date:** [November 10, 2022, 10:35am UTC](https://community.homey.app/t/app-pro-better-logic-library-for-users/71876/5 "2022-11-10T10:35:32Z")

</div>

# The `number` method

Within BLL coding or expressions you can use the `number` method to convert numbers into text, based on your (or another) locale/language.  
It supports overloading, and can be used the following ways:

- `number(number, decimals?, locale?)`
- `number(number, style?, decimals?, locale?)`
- `number(number, style?, styleOption1?, decimals?, locale?)`
- `number(number, style?, styleOption1?, styleOption2?, locale?)`
- `number(number, style?, styleOption1?, styleOption2?, decimals?, locale?)`

## There are 4 styles (decimal is the default):

- decimal
- currency
- percent
- unit

### Decimal

Styleoption1:

- standaard
- scientific
- engineering
- compact\_short
- compact\_long

Styleoption2:

- standaard
- noGrouping

### Currency

StyleOption1:

- Any valid currency, like `USD` or `EUR`

StyleOption2:

- symbol
- narrowSymbol
- code
- name

### Percent

Has no styleoptions

### Unit

StyleOption1:

- acre
- bit
- byte
- celsius
- centimeter
- day
- degree
- fahrenheit
- fluid-ounce
- foot
- gallon
- gigabit
- gigabyte
- gram
- hectare
- hour
- inch
- kilobit
- kilobyte
- kilogram
- kilometer
- liter
- megabit
- megabyte
- meter
- mile
- mile-scandinavian
- milliliter
- millimeter
- millisecond
- minute
- month
- ounce
- percent
- petabyte
- pound
- second
- stone
- terabit
- terabyte
- week
- yard
- year

StyleOption2:

- long
- short
- narrow

---

<div class="post-metadata">

**Author:** ![Arie\_J\_Godschalk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arie_j_godschalk/32/63027_2.png) [@Arie\_J\_Godschalk](https://community.homey.app/u/Arie_J_Godschalk)\
**Post date:** [November 11, 2022, 9:03pm UTC](https://community.homey.app/t/app-pro-better-logic-library-for-users/71876/7 "2022-11-11T21:03:10Z")

</div>

# API

- Feature: Added API support to GET, GET all variables and SET (post) a value.
  - GET: [HTTP://HOMEYADDRES/api/app/net.i-dev.betterlogic/VARIABLENAME](HTTP://HOMEYADDRES/api/app/net.i-dev.betterlogic/VARIABLENAME)
  - GET: [HTTP://HOMEYADDRES/api/app/net.i-dev.betterlogic/ALL](HTTP://HOMEYADDRES/api/app/net.i-dev.betterlogic/ALL) (Get all variables)
  - PUT: [HTTP://HOMEYADDRES/api/app/net.i-dev.betterlogic/VARIABLENAME/VALUE](HTTP://HOMEYADDRES/api/app/net.i-dev.betterlogic/VARIABLENAME/VALUE) //Please ensure that the value matches the type, otherwise it will not be set.

- Feature: Trigger to API. Call
  - PUT for increment: [HTTP://HOMEYADDRES/api/app/net.i-dev.betterlogic/trigger/VARIABLENAME](HTTP://HOMEYADDRES/api/app/net.i-dev.betterlogic/trigger/VARIABLENAME) This triggers the given variable

- Feature: Add increment or decrement to API. Call
  - PUT for increment: [HTTP://HOMEYADDRES/api/app/net.i-dev.betterlogic/VARIABLENAME/i/VALUE](HTTP://HOMEYADDRES/api/app/net.i-dev.betterlogic/VARIABLENAME/i/VALUE) Increments the variable with the given value
  - PUT for decrement: [HTTP://HOMEYADDRES/api/app/net.i-dev.betterlogic/VARIABLENAME/d/VALUE](HTTP://HOMEYADDRES/api/app/net.i-dev.betterlogic/VARIABLENAME/d/VALUE) Decrements the variable with the given value

- Feature: Add toggle of boolean (true-\>false or false-\>true) to API support
  - PUT: [HTTP://HOMEYADDRES/api/app/net.i-dev.betterlogic/VARIABLENAME/toggle](HTTP://HOMEYADDRES/api/app/net.i-dev.betterlogic/VARIABLENAME/toggle) This will force to flip the boolean value

---

<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:** [November 11, 2022, 9:45pm UTC](https://community.homey.app/t/app-pro-better-logic-library-for-users/71876/8 "2022-11-11T21:45:51Z")

</div>

Is it possible to add the “GMT +1” part separately?  
F.i. Homey locale is English,  
but I want to use 24h time, without changing the BLL locale to Dutch.

HH:mm:ss but what is the code for GMT+1?

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

---

<div class="post-metadata">

**Author:** ![Arie\_J\_Godschalk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arie_j_godschalk/32/63027_2.png) [@Arie\_J\_Godschalk](https://community.homey.app/u/Arie_J_Godschalk)\
**Post date:** [November 11, 2022, 10:51pm UTC](https://community.homey.app/t/app-pro-better-logic-library-for-users/71876/9 "2022-11-11T22:51:00Z")

</div>

I know, it’s cool right 🙂

But just added to test:  
KK  
kk  
hh  
h  
tt  
ISO

No fixed GMT+ yet, that will only appear with KK or kk when you have a locale of EN f.i…  
(So for you, this will show GMT±, for me it shows CET).  
Fixed GMT+ will be Z, but no luck yet to complet this part without adding external node-modules.

And i don’t want that, they are all a few MB, while my custom solution is less then 20kb.

---

<div class="post-metadata">

**Author:** ![Arie\_J\_Godschalk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arie_j_godschalk/32/63027_2.png) [@Arie\_J\_Godschalk](https://community.homey.app/u/Arie_J_Godschalk)\
**Post date:** [November 15, 2022, 9:42am UTC](https://community.homey.app/t/app-pro-better-logic-library-for-users/71876/10 "2022-11-15T09:42:18Z")

</div>

### Example on how to use a BLL expression

In this case the date method:

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

You can also create default functions/methods in the App Settings (Test version) and use those in these expression flowcards (or BLL coding).

---

<div class="post-metadata">

**Author:** ![aste](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/aste/32/9729_2.png) [@aste](https://community.homey.app/u/aste)\
**Post date:** [November 22, 2022, 9:28pm UTC](https://community.homey.app/t/app-pro-better-logic-library-for-users/71876/11 "2022-11-22T21:28:01Z")

</div>

Hi,

Thank you for continuing development of this great app!

I upgraded from the legacy Better Logic today and there seems to be an issue with Math.JS condition card. As POC I created T1 and T2 booleans and a test flow.

[https://homey.app/f/luscxi/](https://homey.app/f/luscxi/)

If Math.js expression is true. All variants of T1 and T2 being true of false is considered false.  
If Math.js expression is false. All variants of T1 and T2 being true of false is considered true.

\ Andreas

---

<div class="post-metadata">

**Author:** ![Arie\_J\_Godschalk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arie_j_godschalk/32/63027_2.png) [@Arie\_J\_Godschalk](https://community.homey.app/u/Arie_J_Godschalk)\
**Post date:** [November 24, 2022, 10:27am UTC](https://community.homey.app/t/app-pro-better-logic-library-for-users/71876/12 "2022-11-24T10:27:59Z")

</div>

Hey, i’ll look into it as soon as i am able.  
Could you please create a ticket at bitbucket for it?  
[QlusterIT / nl.qluster-it.BetterLogic / issues — Bitbucket](https://bitbucket.org/QlusterIT/nl.qluster-it.BetterLogic/issues)

Thanks!

---

<div class="post-metadata">

**Author:** ![aste](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/aste/32/9729_2.png) [@aste](https://community.homey.app/u/aste)\
**Post date:** [November 24, 2022, 12:18pm UTC](https://community.homey.app/t/app-pro-better-logic-library-for-users/71876/13 "2022-11-24T12:18:19Z")

</div>

Thanks a bunch.  
Ticket created: [QlusterIT / nl.qluster-it.BetterLogic / issues / #7 - Math.js expression not validating — Bitbucket](https://bitbucket.org/QlusterIT/nl.qluster-it.betterlogic/issues/7/mathjs-expression-not-validating)

---

<div class="post-metadata">

**Author:** ![Julian](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/julian/32/2651_2.png) [@Julian](https://community.homey.app/u/Julian)\
**Post date:** [November 24, 2022, 3:37pm UTC](https://community.homey.app/t/app-pro-better-logic-library-for-users/71876/14 "2022-11-24T15:37:21Z")

</div>

Not sure if this is the same issue and all mathjs calculations are effected, but my BL math.js calculations does not seems to work anymore since november 14. The calculation is quite simple, it is for calculating the costs of a dishwasher cycle

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

---

<div class="post-metadata">

**Author:** ![Arie\_J\_Godschalk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arie_j_godschalk/32/63027_2.png) [@Arie\_J\_Godschalk](https://community.homey.app/u/Arie_J_Godschalk)\
**Post date:** [November 24, 2022, 3:41pm UTC](https://community.homey.app/t/app-pro-better-logic-library-for-users/71876/15 "2022-11-24T15:41:01Z")

</div>

Checking it right now. One moment please.

---

<div class="post-metadata">

**Author:** ![Arie\_J\_Godschalk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arie_j_godschalk/32/63027_2.png) [@Arie\_J\_Godschalk](https://community.homey.app/u/Arie_J_Godschalk)\
**Post date:** [November 24, 2022, 3:47pm UTC](https://community.homey.app/t/app-pro-better-logic-library-for-users/71876/16 "2022-11-24T15:47:14Z")

</div>

@aste and @Julian  
Solved in the current/latest Live version.

I updated to the latest math.js a few weeks ago.  
Internally not different, but the evaluation call itself was changed.

---

<div class="post-metadata">

**Author:** ![Julian](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/julian/32/2651_2.png) [@Julian](https://community.homey.app/u/Julian)\
**Post date:** [November 24, 2022, 3:58pm UTC](https://community.homey.app/t/app-pro-better-logic-library-for-users/71876/17 "2022-11-24T15:58:38Z")

</div>

Thanks for the quick reply & solution!

---

<div class="post-metadata">

**Author:** ![aste](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/aste/32/9729_2.png) [@aste](https://community.homey.app/u/aste)\
**Post date:** [November 24, 2022, 6:20pm UTC](https://community.homey.app/t/app-pro-better-logic-library-for-users/71876/18 "2022-11-24T18:20:12Z")

</div>

Works like a charm. Tnx for your quick resolution!

---

<div class="post-metadata">

**Author:** ![aste](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/aste/32/9729_2.png) [@aste](https://community.homey.app/u/aste)\
**Post date:** [December 10, 2022, 9:00am UTC](https://community.homey.app/t/app-pro-better-logic-library-for-users/71876/19 "2022-12-10T09:00:40Z")

</div>

There seems to be a bug in Math.js not validating Equal

something == something

is always false.

I’ve tried with and without ““ to no avail.

[https://homey.app/f/5nAeXj/](https://homey.app/f/5nAeXj/)  
and an even simplier version  
[https://homey.app/f/drmgXj/](https://homey.app/f/drmgXj/)

Bitbucket bug: [QlusterIT / nl.qluster-it.BetterLogic / issues / #9 - Math.js not validating Equal — Bitbucket](https://bitbucket.org/QlusterIT/nl.qluster-it.betterlogic/issues/9/mathjs-not-validating-equal)

---

<div class="post-metadata">

**Author:** ![Arie\_J\_Godschalk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arie_j_godschalk/32/63027_2.png) [@Arie\_J\_Godschalk](https://community.homey.app/u/Arie_J_Godschalk)\
**Post date:** [December 10, 2022, 10:54am UTC](https://community.homey.app/t/app-pro-better-logic-library-for-users/71876/20 "2022-12-10T10:54:10Z")

</div>

Thanks for reporting!

I’ll have a look asap, somewhere next week.

---

<div class="post-metadata">

**Author:** ![JPe4619](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jpe4619/32/9017_2.png) [@JPe4619](https://community.homey.app/u/JPe4619)\
**Post date:** [December 10, 2022, 12:16pm UTC](https://community.homey.app/t/app-pro-better-logic-library-for-users/71876/21 "2022-12-10T12:16:11Z")

</div>

You probably already know, but you can do this function also with a Logic card.

[Next page](https://community.homey.app/t/app-pro-better-logic-library-for-users/71876.md?page=2)
