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

Which icons?
Do you mean the Device Capabilities app?
[APP][Pro] Device Capabilities - Enhance the capabilities of devices - Apps - Homey Community Forum

Sorry, yes, I mean the ‘pictogram’ option in that app🫣

I’m now trying them one by one :see_no_evil:

Yeah, please goto the [APP][Pro] Device Capabilities - Enhance the capabilities of devices - Apps - Homey Community Forum
ill show it in a post right now.

2 Likes

Thanks! :+1:

1 Like

Solved: Norwegian day and month formats had a trailing dot.

I have just added a new flowcard, once it turns out to work as expected, it will also become available as a BLL expression method.

Format [[number]] as decimal/currency/percent/unit card.

This card has dynamic fields.
You first pick if you want to format it as a decimal, currency, percentage or unit.
Then other options becaume available in the 2 option-dropdown-arguments:

Here an example of Currency, Dollar, with fullname, in Dutch:

image

By default, the locale configured in the BLL app settings will be used, but you can optionally enter another locale in the flowcard.

Check it out now in test:

1 Like

New flowcard and some bugfixes in the Test version:

Format time:
image

This is the same as the time function in expressions.

Also, some fixes for the time function, hh could be 24 instead of 0, this is now resolved.

1 Like

Some updates to the BLL coding functionality

  • Constants added
    • now
      Contains the value of Date.now(), a numeric value representing the current moment in milliseconds, set once at the start of the script.
  • Overloading for the date method:
    • date(format, locale?, timeZone?)
    • date(format, date?, locale?, timeZone?)
  • The new method number has been added to BLL coding, with overloading:
    The number method
1 Like

Hi all!

I’m trying to set a Better logic variable as the date of tomorrow. (written as DD:MM:YYYY). Anybody an idea how to set a variable that wat? Would be great! (Would like to use that variable as input for another app, so it must be exact that format)

1 Like

Use a Set [variable] to [BLL expression]:
date('dd:MM:yyyy', new Date(new Date().setDate(new Date().getDate() + 1 )))

image

1 Like

Thanks for your fast help (again!)
I think that I’m doing something wrong…

I see the inverted version (variable to text). But when trying that, the value is set to the complete BLL expression. Any idea what I’m doing wrong?

Result: (Field ‘tekst’.is set to ‘string’')

Possible (Then) options:


Edited: Sorry, don’t know why but was replying in Dutch…

1 Like

@Ranney

Yeah, sorry, you need to use the card Set variable to BLL expression.

Ja, je moet de set expressie kaart gebruiken, niet de set text.
Sorry

1 Like

Many thanks again Arie! You made the day!!! (And sorry, don’t know why I was replying in Dutch :see_no_evil:
Just translated the previous post in ‘Simple English’ in the hope that it can help somebody else in the future :wink:

1 Like

Hello @Arie_J_Godschalk ,

I have migrated to HP 2023 from HP 2019 (migrated with a backup from HP 2019), and after the migration the values in insights for my variables are frozen. The variables updates values as it should, it is only issues with insights. Do you have a opinion if it is a BLL issue, or a Athom issue?

Regaards
Marius

1 Like

@Marius_Stensrod I am not sure, i didn’t notice it yet.
Can you create a ticket (link is in the topicpost above), ill check it out somewhere this week.

1 Like

I don’t know if it is already asked, but is it possible to get variables onto the sharptools dashboard?

1 Like

I have no idea :wink:
Installing sharptools right now to check it out.

1 Like

Afaik right now, no, not system variables or BLL variables.
Altho, you can see AVD properties.
So, you could create an AVD and add the BLL variables to it through Reflect.
Then you can get them to show in the Sharptools.

1 Like

Oooh. Thank you. It is for free for only a few tiles. You see values from every sensors except better logic values.

1 Like

Hey @Pieter_Pessers ,

What you can do, is use an Advanced Virtual Device from the Device Capabilities app.
I am in contact about adding BLL variables to Sharptools with @joshua, but in the meantime, i have done this:

I have created an Container AVD with one field:
image

image

BLL expression: !$value.trim() ? '' : 'Morgen: ' + $value

This can be added in the Sharptools, where i created a custom Super Tile:
image

In the bottom field, the text from the AVD is shown.

Next, in the dashboard, where the tile is used, i have configured some colors based on the values:
image

The result, based on a BLL variable is this:
image

image

image

image

I have also added a Button on the AVD:
image

In Sharptools i have setup a rule for this:

When i click on the trash-bin in Sharptools, the Button on the AVD is pushed and in a flow, when that button is pushed, it will clear out the BLL Variable (turning of my Homey light and also the Sharptools tile will reset, meaning i have put out the trash).

So, yeah, using BLL variables is possible already without flows, you just need an AVD :wink:

1 Like