# \[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:** 11

<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:** [September 28, 2024, 12:38pm UTC](https://community.homey.app/t/app-pro-better-logic-library-for-users/71876/211 "2024-09-28T12:38:06Z")

</div>

Ah thanks!

I also had to remove the $value part. The following works:  
`"Naam".substring(0, "Naam".indexOf(" "))`

---

<div class="post-metadata">

**Author:** ![Eko\_taas](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eko_taas/32/74256_2.png) [@Eko\_taas](https://community.homey.app/u/Eko_taas)\
**Post date:** [November 3, 2024, 8:53am UTC](https://community.homey.app/t/app-pro-better-logic-library-for-users/71876/212 "2024-11-03T08:53:37Z")

</div>

(Sorry for possible stypid Q ;-/ )

Which TimeZone to use for UTC (UTC±0 ) (i.e. not Day time save) for this card  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/5/5/5545ebc38579ca2daf624d099fd05e7d67ca2068.png)

Seems that w/o time zone device time zone used?

— edit ----

Start using now Iceland time as UTC 0 and without DTS  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/6/8/68fe81e7212832c64e75f6b5af5fd9063fe8921d.png)

---

<div class="post-metadata">

**Author:** ![Esset](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/esset/32/39038_2.png) [@Esset](https://community.homey.app/u/Esset)\
**Post date:** [November 11, 2024, 8:02pm UTC](https://community.homey.app/t/app-pro-better-logic-library-for-users/71876/213 "2024-11-11T20:02:46Z")

</div>

Hello!  
I updated my locale in settings to Swedish. Now all my variables are missing. I tried restarting both app and homey but list of variables in app configuration is completly empty ☹

Will try to factory reset homey and restore from backup.

---

<div class="post-metadata">

**Author:** ![Steef\_de\_Koning](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/steef_de_koning/32/8129_2.png) [@Steef\_de\_Koning](https://community.homey.app/u/Steef_de_Koning)\
**Post date:** [November 23, 2024, 1:30pm UTC](https://community.homey.app/t/app-pro-better-logic-library-for-users/71876/214 "2024-11-23T13:30:07Z")

</div>

Hi,  
I am having a number of flows to see if a washing machine is finished. I created this based on some flows made by ? some years ago.  
For some unknown reasons it stopped working. I am not getting the notification any more.  
I started debuging and saw that the variables created in better logic are not shown in the app.  
The names are still in the flow. When typing the veriable in the better logic app i get a message like attached. Does any one know why the variable can not be shown?

 ![1000030885](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/4/f468e8f14f30eb63e1ab0d4a58a4d12b3a0d4c40.jpeg)

---

<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:** [November 23, 2024, 3:44pm UTC](https://community.homey.app/t/app-pro-better-logic-library-for-users/71876/215 "2024-11-23T15:44:12Z")

</div>

Dit you restart the BetterLogic App?

---

<div class="post-metadata">

**Author:** ![Steef\_de\_Koning](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/steef_de_koning/32/8129_2.png) [@Steef\_de\_Koning](https://community.homey.app/u/Steef_de_Koning)\
**Post date:** [November 23, 2024, 3:55pm UTC](https://community.homey.app/t/app-pro-better-logic-library-for-users/71876/216 "2024-11-23T15:55:44Z")

</div>

Yes i did

---

<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:** [November 23, 2024, 4:17pm UTC](https://community.homey.app/t/app-pro-better-logic-library-for-users/71876/217 "2024-11-23T16:17:11Z")

</div>

![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/e/b/eb67849d91c76ade363b5bac1c183380352cd9b9.png)  
App Switched ON?  
App Re-installed from the App-Store? (without uninstalling)  
Done a PTP (= pull the plug for 12 minutes)?

---

<div class="post-metadata">

**Author:** ![Steef\_de\_Koning](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/steef_de_koning/32/8129_2.png) [@Steef\_de\_Koning](https://community.homey.app/u/Steef_de_Koning)\
**Post date:** [November 25, 2024, 4:22pm UTC](https://community.homey.app/t/app-pro-better-logic-library-for-users/71876/218 "2024-11-25T16:22:37Z")

</div>

Hi Jan,

Thanks for the ptp tip.  
This worked and it looks it is now back to its normal behavior.

Regards

Met vriendelijke groet,

Steef de Koning

---

<div class="post-metadata">

**Author:** ![JonE](https://avatars.discourse-cdn.com/v4/letter/j/f9ae1b/32.png) [@JonE](https://community.homey.app/u/JonE)\
**Post date:** [November 29, 2024, 4:00am UTC](https://community.homey.app/t/app-pro-better-logic-library-for-users/71876/219 "2024-11-29T04:00:44Z")

</div>

@Arie_J_Godschalk I noticed I asked the same question last year too, and also then i could’t find a solution. Would be really happy of you have some more insight! 🙏

---

<div class="post-metadata">

**Author:** ![Rrrr](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rrrr/32/629_2.png) [@Rrrr](https://community.homey.app/u/Rrrr)\
**Post date:** [December 17, 2024, 2:35pm UTC](https://community.homey.app/t/app-pro-better-logic-library-for-users/71876/220 "2024-12-17T14:35:20Z")

</div>

@Arie_J_Godschalk  
Here’s a challenge.

I am trying to list the status of 10 timers (running or not running) in a log without using a variable and a minimum of cards. I am hoping you have a creative solution with BLL.

I am looking for this:

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

The issue is that for each timer combination that is running/not running I need to create another log card.

So I thought of using your other app Advanced Triggers.  
Like this:

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

The issue here is similar: I do not want to create many Return cards.

I also tried with BLL: It is ultimately the same issue.

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

I wish the Return card fields could contain BLL expressions, but even then I would not know how to calculate the answer for each Yes/No variable.  
My problem is that I do not know how to calculate with an empty value (the missing link in the flow).

Any more magnificent ideas?

---

<div class="post-metadata">

**Author:** ![Rrrr](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rrrr/32/629_2.png) [@Rrrr](https://community.homey.app/u/Rrrr)\
**Post date:** [December 18, 2024, 3:53pm UTC](https://community.homey.app/t/app-pro-better-logic-library-for-users/71876/221 "2024-12-18T15:53:13Z")

</div>

I wanted to solve it with BLL, but [here’s the shortest way I managed to do this](https://community.homey.app/t/app-pro-advanced-triggers-trigger-and-action-cards-with-eventname-for-advanced-flows/65651/203).  
Tips for an easier solution using BLL are welcome.

Question:  
Anybody knows where to find documentation on BLL logic AND/OR and syntax?  
😵‍💫

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

---

<div class="post-metadata">

**Author:** ![holgerr](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/holgerr/32/44451_2.png) [@holgerr](https://community.homey.app/u/holgerr)\
**Post date:** [December 19, 2024, 12:55pm UTC](https://community.homey.app/t/app-pro-better-logic-library-for-users/71876/222 "2024-12-19T12:55:17Z")

</div>

Hey, I’m going nuts here and have spent way too much time on something I thought should be quite simple. I have a sensor that returns a datetime string in this format: “19.12.24, 15:33”. Now, when I try to use the flowcard to format the date, it gives me “invalid date”. If I change the string (manually) to “12.19.24, 15:33”, it works just fine. So clearly the flowcard expects the date to be mm.dd.yy - is there any way I can tell it to expect the string in dd.mm.yy format? All the settings I’ve seen seem to affect the output formats, but not the input?

---

<div class="post-metadata">

**Author:** ![holgerr](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/holgerr/32/44451_2.png) [@holgerr](https://community.homey.app/u/holgerr)\
**Post date:** [December 19, 2024, 2:53pm UTC](https://community.homey.app/t/app-pro-better-logic-library-for-users/71876/223 "2024-12-19T14:53:57Z")

</div>

starting to think I have a different problem. Got the reported date to be an ISO text string - which works fine if I paste it into the date field on the flowcard, but if I read it from an attribute or a variable, it gives me the “invalid date” error:

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/1/8/1811677053c4603f52bb1ba228c9b2c3360a3c48.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:** [December 19, 2024, 3:40pm UTC](https://community.homey.app/t/app-pro-better-logic-library-for-users/71876/224 "2024-12-19T15:40:59Z")

</div>

I think the date variable that you are trying to format, needs to be the actual numeric date value, not a formatted string representation of the numeric value.

I am using one of the other BLL cards (set a variable) to format a numeric date value in a more friendly date string:

 ![IMG_1623](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/6/d/6d6bd3da0d422820520792c5527e0d8620f0c099.jpeg)

I assume this principle (of using a numeric date value as starting point) also applies to the card you use.

---

<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 19, 2024, 5:01pm UTC](https://community.homey.app/t/app-pro-better-logic-library-for-users/71876/225 "2024-12-19T17:01:11Z")

</div>

Can you show the value of the dare tag you are using?  
Because ot does/should accept iso dates.

---

<div class="post-metadata">

**Author:** ![holgerr](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/holgerr/32/44451_2.png) [@holgerr](https://community.homey.app/u/holgerr)\
**Post date:** [December 19, 2024, 5:39pm UTC](https://community.homey.app/t/app-pro-better-logic-library-for-users/71876/226 "2024-12-19T17:39:16Z")

</div>

It’s 2024-12-19T14:27:55.000Z - which the date() function happily accepts if I put the variable in single quotes, so using that as a workaround now.

---

<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 19, 2024, 6:19pm UTC](https://community.homey.app/t/app-pro-better-logic-library-for-users/71876/227 "2024-12-19T18:19:12Z")

</div>

Thats kinda stranges, because the bll expression and flowcard use the exact same method for the dat function.  
Ill have a check.

---

<div class="post-metadata">

**Author:** ![holgerr](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/holgerr/32/44451_2.png) [@holgerr](https://community.homey.app/u/holgerr)\
**Post date:** [December 20, 2024, 10:58am UTC](https://community.homey.app/t/app-pro-better-logic-library-for-users/71876/228 "2024-12-20T10:58:27Z")

</div>

Thanks - it’s really strange, since putting the string into the flowcard works, but putting in the variable that holds the string doesn’t (tried with and without quotes), while the flowcard that executes BLL functions happily accepts the variable with the string as a parameter. Also tried both internal Homey variables and BLL variables - no difference.

---

<div class="post-metadata">

**Author:** ![SigurdABj](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sigurdabj/32/121069_2.png) [@SigurdABj](https://community.homey.app/u/SigurdABj)\
**Post date:** [April 1, 2025, 7:34pm UTC](https://community.homey.app/t/app-pro-better-logic-library-for-users/71876/229 "2025-04-01T19:34:51Z")

</div>

All,  
I am complete lost and need some help with a very simple math expression in BLL. I have tried to seek information everywhere without success and I am new to Homey.

What I try to do is to find is a fraction based on how many minutes we are into the hour divided by 60. I will use this to estimate the power consumption for the current hour.

I use a BLL set variable to math.js expression.  
The formula I try to use is #timenow#mm / 60. Homey is happy but the BLL variable hour\_frac I have created is not updated with any value.

Can anyone give me a hint on how I can get the current minutes into hour and use it as a variable please.

With regards  
Sigurd

---

<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:** [April 1, 2025, 8:06pm UTC](https://community.homey.app/t/app-pro-better-logic-library-for-users/71876/230 "2025-04-01T20:06:42Z")

</div>

Try: `date('m', Date.now())/60`

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

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