# \[APP\]\[Pro\] Device Capabilities - Enhance the capabilities of devices

**URL:** <https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287>\
**Category:** Apps\
**Tags:** flow, virtual-device, homey-pro, device-capabilities, avd\
**Created:** [February 19, 2021, 8:20am UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287 "2021-02-19T08:20:51Z")\
**Posts on this page:** 20\
**Page:** 82

<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 31, 2023, 10:31am UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/1649 "2023-12-31T10:31:14Z")

</div>

> [@Peter\_Kawa](#):
>
> time(‘HH:mm:ss’, $value)

Well, inserting the value is not needed since a while; if no parameter is given, the $value is automaticly inserted.

About 1 or 2 HH, this only means the minimum padding.  
Like with 6 hours left, H will give 6 while HH will give 06.  
So it depends on how you want it shown 😉

See the BLL app settings for all examples on the formatting. Scroll the bottom to Time formating:

 ![Screenshot_20231231_113005_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/f/3f1212e581b394bc68a7b043b0668a0c8d6394b9.jpeg)  
 ![Screenshot_20231231_113031_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/a/6/a6a2fc015a11ce5ece08e0a539a206f770167eaa.jpeg)

---

<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 31, 2023, 10:35am UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/1650 "2023-12-31T10:35:33Z")

</div>

Thx m8. I was confused about the `$value` part.  
I can’t keep up so it seems 🤣

---

<div class="post-metadata">

**Author:** ![Heula](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/heula/32/31852_2.png) [@Heula](https://community.homey.app/u/Heula)\
**Post date:** [December 31, 2023, 10:53am UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/1651 "2023-12-31T10:53:09Z")

</div>

Thank you Arie, it’s always simple if you know how to do it 👍

Happy New Year.

---

<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 31, 2023, 10:54am UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/1652 "2023-12-31T10:54:46Z")

</div>

> [@Heula](#):
>
> Happy New Year.

Thanks, you and everyone else to: happy new year!

---

<div class="post-metadata">

**Author:** ![Dennis\_van\_Dinter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dennis_van_dinter/32/28180_2.png) [@Dennis\_van\_Dinter](https://community.homey.app/u/Dennis_van_Dinter)\
**Post date:** [January 6, 2024, 9:40am UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/1653 "2024-01-06T09:40:56Z")

</div>

Hi all,

I need a little help.

Is it possible to reflect a boolean of a device in a text field and convert its value to a custom text? For example if the boolean is ‘yes’ then convert to “off course” and if ‘no’ then convert to “off course not”. I can do this from a flow, but is it also possible to do it from the device settings menu by using an expression and call a function that returns the right string?

 ![Screenshot_20240106-102858_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/c/cc3715e0175d1748d671a1b4286d126934593ce7.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:** [January 6, 2024, 2:23pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/1654 "2024-01-06T14:23:04Z")

</div>

> [@Dennis\_van\_Dinter](#):
>
> but is it also possible to do it from the device settings menu by using an expression

Yes, and its pretty easy, place this in the BLL expression field:  
`$value ? 'Off course' : 'off course not'`

---

<div class="post-metadata">

**Author:** ![Dennis\_van\_Dinter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dennis_van_dinter/32/28180_2.png) [@Dennis\_van\_Dinter](https://community.homey.app/u/Dennis_van_Dinter)\
**Post date:** [January 6, 2024, 2:58pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/1655 "2024-01-06T14:58:21Z")

</div>

Works perfectly! Thanks, Arie!

---

<div class="post-metadata">

**Author:** ![Dennis\_van\_Dinter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dennis_van_dinter/32/28180_2.png) [@Dennis\_van\_Dinter](https://community.homey.app/u/Dennis_van_Dinter)\
**Post date:** [January 6, 2024, 6:28pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/1656 "2024-01-06T18:28:42Z")

</div>

Do you have more of these handy dandy expressions? Or is there some sort of online summary what I can look for?

---

<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:** [January 6, 2024, 7:20pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/1657 "2024-01-06T19:20:37Z")

</div>

> [@Dennis\_van\_Dinter](#):
>
> Do you have more of these handy dandy expressions?

Yeah, well, i guess i could explain it a bit more in the app settings:

 ![Screenshot_20240106_195649_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/e/ceabe0bf56c8cf4c4e96ec89e7857cabd3427e67.jpeg)

The expressions are just javascript expressions, with some wrapped around BLL stuff.  
I have buildin extra modules and methods, and the posibility to create own custom functions to be used in the expressions.

But its basicly just JavaScript executions, just as you could do within HomeyScript. But more customisable and usable within way more flowcard for putting stuff in variables etc., PLUS you can use all that either within textarguments in flowcards from other apps that include BLL coding, or in BLL expression fields, like in Device Capabilities, Google Services, FTP client, Simple (Sys) Logging, BLL itself, etc.

> [@Dennis\_van\_Dinter](#):
>
> Or is there some sort of online summary what I can look for?

Well, just see/learn how JavaScript expressions work. And see the BLL app settings (and there links) for info on the included modules and methods.  
Where other properties exists, like in the AVD field reflections, those properties are shown in the popup infobutton next to the field, as examples, `$value` and `$values`.

Now, in my answer

> [@Arie\_J\_Godschalk](#):
>
> $value ? ‘Off course’ : ‘off course not’

Correction, **technicly** better should have been `$value === true ? 'Off course' : 'off course not'`

That is just a basic javascript expression returning based on the value of the first object, in this case the variable containing the value, and if `true` (or “filled” with a object or value other than `undefined`, `null`, `0` or `false`) it will display the first given value after the questionmark, if it is an `undefined`, `null`, `0` or `false` it will return the last value, the one after the `:`.

So, for example, if you want a button for a dimmer, that will be On if the dimmer is 1% or more, you could create a buttonfield with on/off, and use this Javascript expression: `$value > 0.00 ? true : false`.  
Or if you want to create a Sensor Textfield for a dimmertext:  
`$value == 1.00 ? 'Full on' : $value > 0.50 ? 'Half on' : $value > 0.00 ? 'Low on' : 'Off'`

Also, everything know to the javascript engine on Homey, like the default `Date` object or the default `Math`, is available. Basicly everything thats available in HomeyScript, is available in BLL expressions, except the added stuff in HS like `Homey` or the tag stuff.

Here is a site about JavaScript, and explaines, among other things, the Primitive Expressions.  
It’s perhaps a bit advanced or deep, but contains some good info and enough “images”/examples, that might trigger creative solutions or ideas.

 ![Screenshot_20240106_203734_Edge](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/8/f8f6a82e22552870da6efc1d017be4dabc38c407.jpeg)

[Expressions and Operators - JavaScript: The Definitive Guide, 7th Edition [Book]](https://www.oreilly.com/library/view/javascript-the-definitive/9781491952016/ch04.html#:~:text=The%20simplest%20expressions%2C%20known%20as,language%20keywords%2C%20and%20variable%20references).

---

<div class="post-metadata">

**Author:** ![Exerqtor](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/exerqtor/32/27144_2.png) [@Exerqtor](https://community.homey.app/u/Exerqtor)\
**Post date:** [January 7, 2024, 12:44pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/1658 "2024-01-07T12:44:45Z")

</div>

Is it still an bug causing problems for you/the app since the custom lists submitted all the way back from october still haven’t made their way into the experimental release? 🤔

---

<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:** [January 7, 2024, 1:12pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/1659 "2024-01-07T13:12:02Z")

</div>

Indeed, sorry about that m8. I have thursday planned to furture update the homey-api dependency or to build workarounds to be able to release the testversion.

---

<div class="post-metadata">

**Author:** ![Exerqtor](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/exerqtor/32/27144_2.png) [@Exerqtor](https://community.homey.app/u/Exerqtor)\
**Post date:** [January 7, 2024, 3:53pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/1660 "2024-01-07T15:53:20Z")

</div>

No problem ✌ Hopefully you will find a way around it!

---

<div class="post-metadata">

**Author:** ![Heula](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/heula/32/31852_2.png) [@Heula](https://community.homey.app/u/Heula)\
**Post date:** [January 7, 2024, 7:42pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/1661 "2024-01-07T19:42:00Z")

</div>

Hi @Arie_J_Godschalk , I have issues that are possibly related to short free memory issues of my Homey 2023?  
When I look at my apps using memory there are a few that go higher than all the others. Device capabilities and Better logic are going up to 91 mb for Device capabilities and 77 mb for Better logic.  
Not sure if this is normal for your apps but when I disable them and enable them again they both use about 20 mb less memory. After 30 minutes I see Device capabilities go back to around 85 mb.

I have 55 AVD’s doing all kind of things with better logic and chronograph so maybe I ask to much of the app and my Homey?

There is no way of disabling AVD’s to see whitch ones are responsible. I know I can create a TEF, delete them and import them again but that is not the most friendly way.

Is there anything else I can do to let Device capabilities and Better logic use lees memory?

After disabling Device capabilities and BLL

 ![Capture_1091](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/2/c2177ac272d5dfd02d46a4dc607d45001c63ac10.jpeg)

30 minutes later

 ![Capture_1093](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/6/4/642d8cb2877c26d7b3e8cc0ce499dff00fb23a44.jpeg)

 ![Capture_1094](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/8/b/8bebf89d8295ec6d14602ecd9d56c649ca331da7.jpeg)  
 ![Capture_1095](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/5/f/5f2cc5a9ae829cac9bb7e1a1b999f7e24bd8a6d6.jpeg)

BLL ca5f473b-cf07-425e-8b7a-cc85eaa5bdaa  
DC 509b621b-5f23-4e24-b3c6-128d07f62bdb

Thanks.

---

<div class="post-metadata">

**Author:** ![Dennis\_van\_Dinter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dennis_van_dinter/32/28180_2.png) [@Dennis\_van\_Dinter](https://community.homey.app/u/Dennis_van_Dinter)\
**Post date:** [January 7, 2024, 8:06pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/1662 "2024-01-07T20:06:30Z")

</div>

Thanks for the extensive answer! It makes a little bit more sense 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:** [January 7, 2024, 8:20pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/1663 "2024-01-07T20:20:04Z")

</div>

> [@Heula](#):
>
> Device capabilities

Are you using the testversion or the stabile one?

---

<div class="post-metadata">

**Author:** ![Heula](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/heula/32/31852_2.png) [@Heula](https://community.homey.app/u/Heula)\
**Post date:** [January 7, 2024, 8:40pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/1664 "2024-01-07T20:40:16Z")

</div>

Test version 2.15.4

---

<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:** [January 7, 2024, 11:08pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/1665 "2024-01-07T23:08:26Z")

</div>

A well, once the new version is working correctly, and my hp2023 is up again, ill migrate and see if i can improve it more on live situations.

---

<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:** [January 14, 2024, 2:25pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/1666 "2024-01-14T14:25:30Z")

</div>

> [@Arie\_J\_Godschalk](#):
>
> App started

When I use the App … started card, it works when I use it for some but not all apps. Do you know why?

App Device Capabilities started: works  
App Better Logic Library started: does not work  
App Power by the Hour started: does not work.

---

<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:** [January 14, 2024, 3:07pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/1667 "2024-01-14T15:07:03Z")

</div>

> [@Rrrr](#):
>
> Do you know why?

No i didnt know about that.  
Yesterday i migrated to the hp2023 again, im hoping it will work stable finally, so i can fasttrack my development again.

---

<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:** [January 15, 2024, 5:24pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/1668 "2024-01-15T17:24:49Z")

</div>

> [@Arie\_J\_Godschalk](#):
>
> Yesterday i migrated to the hp2023 again, im hoping it will work stable finally

Nope, i just switched back to the hp2019 🤔

[Previous page](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287.md?page=81)

[Next page](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287.md?page=83)
