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

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

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

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%”

Sure!

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

@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.


@Pairis
you are writing: day-minutes-years

use dd-MM-yyyy :wink:

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 :wink:

1 Like

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

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’)”.

Have you tried restarting the bll app?

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

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

1 Like

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

Reading settings or setting?

‘settings’

@Stian_Hogganvik And when and do you get this error?

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

Thanks for quick Reply.
Happens when pressing all buttons

Here is diagnostic

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.

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

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

So it will show minutes.

1 Like

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!

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

(All cards are ‘Then’ cards)

1 Like

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?