# \[APP\]\[Pro\] Better Logic Library - Just some better logic, variable and library management

**URL:** <https://community.homey.app/t/app-pro-better-logic-library-just-some-better-logic-variable-and-library-management/5568>\
**Category:** Apps\
**Tags:** app, tools, homey-pro, bll\
**Created:** [December 16, 2018, 10:29pm UTC](https://community.homey.app/t/app-pro-better-logic-library-just-some-better-logic-variable-and-library-management/5568 "2018-12-16T22:29:57Z")\
**Posts on this page:** 20\
**Page:** 20

<div class="post-metadata">

**Author:** ![Arnt\_Soloy](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arnt_soloy/32/58318_2.png) [@Arnt\_Soloy](https://community.homey.app/u/Arnt_Soloy)\
**Post date:** [August 29, 2023, 7:27pm UTC](https://community.homey.app/t/app-pro-better-logic-library-just-some-better-logic-variable-and-library-management/5568/389 "2023-08-29T19:27:57Z")

</div>

@Arie_J_Godschalk  
Could you add a AND “Number Variable is between Value and Value” card?

---

<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:** [August 29, 2023, 8:45pm UTC](https://community.homey.app/t/app-pro-better-logic-library-just-some-better-logic-variable-and-library-management/5568/390 "2023-08-29T20:45:13Z")

</div>

Sure, please create a ticket and ill add is as soon as i am able.

---

<div class="post-metadata">

**Author:** ![zakraket](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/zakraket/32/17470_2.png) [@zakraket](https://community.homey.app/u/zakraket)\
**Post date:** [August 31, 2023, 7:12am UTC](https://community.homey.app/t/app-pro-better-logic-library-just-some-better-logic-variable-and-library-management/5568/391 "2023-08-31T07:12:57Z")

</div>

WIll it be possible to show the value on a variable device (NumSlide) as status?

It would also be great to have a way to start a flow with some value (f.e. “charge my car to XX%”

---

<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:** [September 12, 2023, 10:59am UTC](https://community.homey.app/t/app-pro-better-logic-library-just-some-better-logic-variable-and-library-management/5568/392 "2023-09-12T10:59:01Z")

</div>

Sure!

Please create a ticket and i’ll get to it asap.

---

<div class="post-metadata">

**Author:** ![Pairis](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pairis/32/56439_2.png) [@Pairis](https://community.homey.app/u/Pairis)\
**Post date:** [September 20, 2023, 2:11pm UTC](https://community.homey.app/t/app-pro-better-logic-library-just-some-better-logic-variable-and-library-management/5568/393 "2023-09-20T14:11:02Z")

</div>

@Arie_J_Godschalk

Is there something wrong or (most likely) am I doing something wrong?

When I am calling Date.now() in BLL I’m getting inconsistent results.  
After multiple ‘test here’ I am now getting ‘today’. But I don’t think this is correct.

 ![Scherm­afbeelding 2023-09-20 om 16.03.53](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/b/d/bd28b88432a601fd3ec1ab385ea9b3b0531ab3e1.png)  
 ![Scherm­afbeelding 2023-09-20 om 16.06.54](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/4/a/4a8b94444be78ca089e60a28b5f7f2188bd7e9c1.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:** [September 20, 2023, 2:57pm UTC](https://community.homey.app/t/app-pro-better-logic-library-just-some-better-logic-variable-and-library-management/5568/394 "2023-09-20T14:57:30Z")

</div>

@Pairis  
you are writing: day-minutes-years

use `dd-MM-yyyy` 😉

BTW, you do not need to fill the date with now.  
If you leave the second parameter empty, it will use date.now() by default.  
so:  
`date('dd-MM-yyyy')`  
or  
`date('dd-MM-yyyy', now)`

or just use the Format Date flowcard 😉

---

<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:** [September 28, 2023, 8:21am UTC](https://community.homey.app/t/app-pro-better-logic-library-just-some-better-logic-variable-and-library-management/5568/395 "2023-09-28T08:21:25Z")

</div>

> [@timvdhoorn](#):
>
> Can someone help me in making a BLL expression for use in Device Capabilities?

Hey @timvdhoorn , did you figure it out or do you still need some help?

---

<div class="post-metadata">

**Author:** ![Annie\_S](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/annie_s/32/79236_2.png) [@Annie\_S](https://community.homey.app/u/Annie_S)\
**Post date:** [July 23, 2023, 11:17am UTC](https://community.homey.app/t/app-pro-better-logic-library-just-some-better-logic-variable-and-library-management/5568/396 "2023-07-23T11:17:34Z")

</div>

After update to Better Logic version 3.4.4 it is not working anymore on my Homey (Early 2016). Getting message “Cannot read properties of undefined (reading ‘setting’)”.

---

<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:** [July 23, 2023, 11:36am UTC](https://community.homey.app/t/app-pro-better-logic-library-just-some-better-logic-variable-and-library-management/5568/398 "2023-07-23T11:36:13Z")

</div>

Have you tried restarting the bll app?

Try restarting the app.  
If you still get that error, please send me a diagnostic report.

---

<div class="post-metadata">

**Author:** ![Annie\_S](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/annie_s/32/79236_2.png) [@Annie\_S](https://community.homey.app/u/Annie_S)\
**Post date:** [July 23, 2023, 12:14pm UTC](https://community.homey.app/t/app-pro-better-logic-library-just-some-better-logic-variable-and-library-management/5568/399 "2023-07-23T12:14:00Z")

</div>

Restarting the app seems to have solved the problem. Thanks!

---

<div class="post-metadata">

**Author:** ![Stian\_Hogganvik](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/stian_hogganvik/32/34553_2.png) [@Stian\_Hogganvik](https://community.homey.app/u/Stian_Hogganvik)\
**Post date:** [September 25, 2023, 7:49pm UTC](https://community.homey.app/t/app-pro-better-logic-library-just-some-better-logic-variable-and-library-management/5568/400 "2023-09-25T19:49:24Z")

</div>

Love the app, but I now have the same problem on 3.4.5 version. "  
Cannot read properties of undefined (reading ‘setting’)”.  
Restart did not solve problem.

Here is diagnostic  
b6011726-6830-476b-92cb-67de7005f969

---

<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:** [September 26, 2023, 1:47pm UTC](https://community.homey.app/t/app-pro-better-logic-library-just-some-better-logic-variable-and-library-management/5568/401 "2023-09-26T13:47:37Z")

</div>

> [@Stian\_Hogganvik](#):
>
> Cannot read properties of undefined (reading ‘setting’)”.

Reading settings or setting?

---

<div class="post-metadata">

**Author:** ![Stian\_Hogganvik](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/stian_hogganvik/32/34553_2.png) [@Stian\_Hogganvik](https://community.homey.app/u/Stian_Hogganvik)\
**Post date:** [September 26, 2023, 2:16pm UTC](https://community.homey.app/t/app-pro-better-logic-library-just-some-better-logic-variable-and-library-management/5568/402 "2023-09-26T14:16:05Z")

</div>

![Image.png](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/a/c/aca5363c5c695a8173979a9853172a927cfed184.png)

‘settings’

---

<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:** [September 26, 2023, 3:20pm UTC](https://community.homey.app/t/app-pro-better-logic-library-just-some-better-logic-variable-and-library-management/5568/403 "2023-09-26T15:20:00Z")

</div>

@Stian_Hogganvik And when and do you get this error?

Please send an diagnostic afer you get the error from above.

---

<div class="post-metadata">

**Author:** ![Stian\_Hogganvik](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/stian_hogganvik/32/34553_2.png) [@Stian\_Hogganvik](https://community.homey.app/u/Stian_Hogganvik)\
**Post date:** [September 26, 2023, 3:26pm UTC](https://community.homey.app/t/app-pro-better-logic-library-just-some-better-logic-variable-and-library-management/5568/404 "2023-09-26T15:26:07Z")

</div>

Thanks for quick Reply.  
Happens when pressing all buttons

Here is diagnostic

17eba65a-9032-4b86-9276-3ec26117b712

---

<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:** [September 28, 2023, 8:59am UTC](https://community.homey.app/t/app-pro-better-logic-library-just-some-better-logic-variable-and-library-management/5568/405 "2023-09-28T08:59:40Z")

</div>

> [@Stian\_Hogganvik](#):
>
> 17eba65a-9032-4b86-9276-3ec26117b712

Resolved.  
This issue seems to happen sometimes when the app is updated from the older 2.\* version, but the permission is not set properly.  
Re-installing (without uninstall) seems to fix it.

---

<div class="post-metadata">

**Author:** ![timvdhoorn](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/timvdhoorn/32/55746_2.png) [@timvdhoorn](https://community.homey.app/u/timvdhoorn)\
**Post date:** [October 3, 2023, 7:35am UTC](https://community.homey.app/t/app-pro-better-logic-library-just-some-better-logic-variable-and-library-management/5568/406 "2023-10-03T07:35:49Z")

</div>

Hi Arie, Thank you for asking. I managed to fix it!  
For others:

```auto
(Number($value) === 0) ? 0 : Math.round((Number($value) / 1000 + 30) / 60)

```

So it will show minutes.

---

<div class="post-metadata">

**Author:** ![Ranney](https://avatars.discourse-cdn.com/v4/letter/r/848f3c/32.png) [@Ranney](https://community.homey.app/u/Ranney)\
**Post date:** [December 25, 2023, 10:20am UTC](https://community.homey.app/t/app-pro-better-logic-library-just-some-better-logic-variable-and-library-management/5568/407 "2023-12-25T10:20:06Z")

</div>

Dear Arie,

Many thanks again for this great app!

I was hoping that you can help me with something that I can’t get working…

I have a bosch washing machine and dryer. They are reporting the remaining time. (Always in round minutes). Example: 176:00  
I would like to report this as better logic variable in HH:MM. so in this case; not 176:00 but 2:56. Is there a way to do this? And if not, is it then possible to automatically remove the ‘:00’ part?l so that I have just the ‘minutes’ part?

Many thanks in advance for your time and help. For now; Merry Christmas!

---

<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:** [December 26, 2023, 12:33am UTC](https://community.homey.app/t/app-pro-better-logic-library-just-some-better-logic-variable-and-library-management/5568/408 "2023-12-26T00:33:07Z")

</div>

Hi Ranney

You can do it like this:  
Create a numeric variable, I called it `dryer_remaining_minutes`

The tag [`dryer_remaining`] represents the tag from your dryer, which should be a string(text) tag (right?)

You can view the result from the Timeline card next to it in the Timeline Viewer

 ![Screenshot from 2023-12-26 01-11-02](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/e/e/ee315d5635e34ffaf4adf31061719d13c49109d8.png)

(All cards are ‘Then’ cards)

---

<div class="post-metadata">

**Author:** ![Ranney](https://avatars.discourse-cdn.com/v4/letter/r/848f3c/32.png) [@Ranney](https://community.homey.app/u/Ranney)\
**Post date:** [December 26, 2023, 8:03am UTC](https://community.homey.app/t/app-pro-better-logic-library-just-some-better-logic-variable-and-library-management/5568/409 "2023-12-26T08:03:50Z")

</div>

Many thanks for your help!

I’m trying to reproduce your flow. But interesting enough, the homey app is crashing when I set a value like this:  
{{ 0+(‘‘124:00’’.split(‘’:‘’)[1]) }}  
(124:00 is a test value)

Any idea what I’m doing wrong?

[Previous page](https://community.homey.app/t/app-pro-better-logic-library-just-some-better-logic-variable-and-library-management/5568.md?page=19)

[Next page](https://community.homey.app/t/app-pro-better-logic-library-just-some-better-logic-variable-and-library-management/5568.md?page=21)
