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

<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:** [August 29, 2022, 4:11pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/245 "2022-08-29T16:11:48Z")

</div>

Yes, it works for me when I use a text field:

Var value = 3.9  
 ![Screenshot from 2022-08-29 18-09-35](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/4/f4fdf540ba4f3d31f9d32e97783ed2a6b45ac551.png)

Flowcard calc 3.9\*1000  
 ![Screenshot from 2022-08-29 18-09-52](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/f/cf59b6c1f4bbdcbf1cff3d5a01066ae3a4bb2a9a.png)

Device text value = 3900  
 ![Screenshot from 2022-08-29 18-10-09](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/6/060bf387397218e954ce17ce5d76e9d004c29abc.png)

---

<div class="post-metadata">

**Author:** ![HuisCHovens](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/huischovens/32/16973_2.png) [@HuisCHovens](https://community.homey.app/u/HuisCHovens)\
**Post date:** [August 29, 2022, 4:41pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/246 "2022-08-29T16:41:14Z")

</div>

Nice I was looking at number boxes and then I couldn’t make a calculation. going to try it via text.

Yes it works on text field but then you don’t see anything on the tile and it doesn’t match with unit.

---

<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, 2022, 5:14pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/247 "2022-08-29T17:14:15Z")

</div>

Not yet, but i will add Set Number (Expression) cards, based on my HOOP model: a All javascript expression are valid and you can have custom pre-definded functions through settings.

But first let me finish all button types correctly.

---

<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:** [August 29, 2022, 6:23pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/248 "2022-08-29T18:23:05Z")

</div>

> [@HuisCHovens](#):
>
> Yes it works on text field but then you don’t see anything on the tile and it doesn’t match with unit.

It also works with status.  
You can enter any unit you like, that’s one fun part of this app 🙃

 ![Screenshot_20220829-202218_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/7/0/704b908f399f7e1cf6f2562fe02ec115d65081eb.jpeg)

![Screenshot_20220829-201656_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/1/6/16ee4b52069319363ade7e7b17db895833f581a8.jpeg)

---

<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, 2022, 7:09pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/249 "2022-08-29T19:09:30Z")

</div>

Version 1.9.85 in test right now:  
Buttons are pretty much finished, all option combo’s that i currently can see are implemented.

---

<div class="post-metadata">

**Author:** ![Caseda](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/caseda/32/138695_2.png) [@Caseda](https://community.homey.app/u/Caseda)\
**Post date:** [August 29, 2022, 7:18pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/250 "2022-08-29T19:18:14Z")

</div>

Some more testing has been done with .84:

1. Seems like I can’t remove the default yes/no capability, does seem like a `removeCapability()` is being executed (the device reloads in the web GUI), but the capability stays, have tried different ways, removing just the on/off, remove all default capabilities at the same time, tried just giving it a different name, the old on/off stays.  
I can remove the new on/off capability, so looks like the ID internally is wrong from the start.

2. seems you have a small racing condition issue or something, when you change a lot of capabilities (replace the default, and add additional ones), some _default capabilities_ might stay as if the ID is already changed internally (the new ones do stay, so not entirely sure that it is really is a racing condition)  
Looks kinda the same thing as point 1, if it is an internal ID issue.

---

<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, 2022, 7:25pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/251 "2022-08-29T19:25:59Z")

</div>

Thanks m8!

Okay, next version is in test.  
I found a var instead of a let. And some other bugfixes. Could you try it again?

---

<div class="post-metadata">

**Author:** ![Caseda](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/caseda/32/138695_2.png) [@Caseda](https://community.homey.app/u/Caseda)\
**Post date:** [August 29, 2022, 7:39pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/252 "2022-08-29T19:39:25Z")

</div>

Nope, unfortunately the default on/off capability keeps wanting to be there on .86.

PS: Not sure if you log anything useful, and thus if you want the log every time?

---

<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, 2022, 7:49pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/253 "2022-08-29T19:49:15Z")

</div>

Could you use this script in HomeyScript:

```auto
var _devices = (await Homey.devices.getDevices());

for(var deviceID in _devices) {
        var device = _devices[deviceID];
        if(device.name=='DC VD') console.log(device.capabilitiesObj);
    }

```

Where DC VD is the device name.  
And an image of device settings with the yes/no fields.

Then i can maybe simulate it.

Does this also happen with a new device created with this version?

---

<div class="post-metadata">

**Author:** ![Caseda](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/caseda/32/138695_2.png) [@Caseda](https://community.homey.app/u/Caseda)\
**Post date:** [August 29, 2022, 7:55pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/254 "2022-08-29T19:55:45Z")

</div>

It is everytime with a new device, but looking at the result from the HomeyScript i probably already see what is going wrong, indeed an ID issue:

> Default:  
> alarm\_devicecapabilities\_boolean.boolean1  
> New/Changed:  
> devicecapabilities\_boolean.boolean1

```auto
  'alarm_devicecapabilities_boolean.boolean1': {
    value: null,
    lastUpdated: null,
    type: 'boolean',
    getable: true,
    setable: true,
    title: 'Yes/No',
    desc: null,
    units: null,
    id: 'alarm_devicecapabilities_boolean.boolean1',
    options: {},
    values: undefined
  },
  'devicecapabilities_boolean.boolean1': {
    value: null,
    type: 'boolean',
    getable: true,
    setable: true,
    title: 'Test',
    desc: null,
    units: null,
    id: 'devicecapabilities_boolean.boolean1',
    options: {
      title: 'Test',
      preventInsights: false,
      insightsTitleTrue: 'True',
      insightsTitleFalse: 'False'
    },
    values: undefined
  }

```

---

<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, 2022, 8:20pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/255 "2022-08-29T20:20:09Z")

</div>

Okay, next version.

Indeed, number1, status1 could go wrong.  
yes/no1 always went wrong.

Should be fixed 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:** [August 29, 2022, 8:20pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/256 "2022-08-29T20:20:18Z")

</div>

Just dont use settings 😉

(Joke)

---

<div class="post-metadata">

**Author:** ![Caseda](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/caseda/32/138695_2.png) [@Caseda](https://community.homey.app/u/Caseda)\
**Post date:** [August 29, 2022, 8:55pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/257 "2022-08-29T20:55:24Z")

</div>

yay, you did it!  
Now for some more testing 😛 but looks good so far.

---

<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, 2022, 9:12pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/258 "2022-08-29T21:12:32Z")

</div>

**Now in TEST!**  
@Peter_Kawa , @HuisCHovens

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

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

This will set the Yes/No to false/no.

i run a vm sandbox, which includes Math, lodash-core (\_) and functions you can pre-define in App Settings.

![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/1/c18c62560cda5d4c79d3e47ebb84f3d78767aca8.png)  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/e/8/e8419d5b402f21e42f06f5932e3b7b7eeaca412e.png)

![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/1/2/12e7120da1053659235d773464c3ab15b49117f7.png)  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/9/39a494ea5513fc668234d8118eae8db584b88e69.png)

Here are the settings:

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/4/a/4a1203f1fb2e526a3fe4641f9c797720338bd612.png)

Here i have a random function:

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/8/8/887e52b68b0ee798b4b1dd4dc8dfcbf048f7bc57.png)

Now you can use that with the expression card.  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/1/31ba57d840e12ffd90f1e519c771f86ff5e859e9.png)

**All fields can be set through this one card, just make sure it returns string, number or yes/no as needed.**

---

<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, 2022, 9:16pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/259 "2022-08-29T21:16:05Z")

</div>

Next up (but not today anymore) “Show as” for number fields: Slider, battery, alarm\_barttery, etc.

If anyone finds bugs in 1.9.9, please let me know.

---

<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 30, 2022, 8:06am UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/260 "2022-08-30T08:06:27Z")

</div>

Hey Ruijter,

You can now even use Custom icons for capabilities!

---

<div class="post-metadata">

**Author:** ![Gruijter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gruijter/32/1973_2.png) [@Gruijter](https://community.homey.app/u/Gruijter)\
**Post date:** [August 30, 2022, 8:31am UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/261 "2022-08-30T08:31:27Z")

</div>

Well done Arie! I just knew you could perform magic 💪

---

<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 30, 2022, 8:32am UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/262 "2022-08-30T08:32:39Z")

</div>

> [@Le\_Cactus](#):
>
> You think implementing a slector/slider like thermostats have would be possible? Like this:

Hey Cactus,

I have tried a couple of ways to manipulate the data, but have not found a solution as of yet.  
Still have one option to try, but i first wanna complete numbers Show As.

---

<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 30, 2022, 11:51am UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/263 "2022-08-30T11:51:30Z")

</div>

Version 1.9.91 is in Test:

Added many Button Show as options and Numbers Show as Options.  
Next to custom options, the following default “options” are implemented:

- Button  
‘onoff’, ‘button’, ‘locked’, ‘garagedoor\_closed’, ‘windowcoverings\_closed’,‘volume\_mute’, ‘speaker\_playing’,  
‘volume\_up’, ‘volume\_down’, ‘channel\_up’, ‘channel\_down’, ‘windowcoverings\_tilt\_up’, ‘windowcoverings\_tilt\_down’
- Number  
‘target\_temperature’, ‘dim’, ‘light\_hue’, ‘light\_saturation’, ‘light\_temperature’,  
‘measure\_battery’, ‘volume\_set’, ‘windowcoverings\_tilt\_set’, ‘windowcoverings\_set’, ‘speaker\_duration’, ‘speaker\_position’

**This way you can, for instance, completly design your own Music Player Or Buttonbox.**

Show as for Boolean will be extended and Show as for numbers will be added (so you can set a artist or albumname for instance).

---

<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 30, 2022, 1:47pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/264 "2022-08-30T13:47:32Z")

</div>

1.9.92 is in test.  
Basicly, most types got the Create Flow Cards (and buttons) checkbox.  
When this is enabled, it will make sure the capability, for instance speaker\_playing, is really that capability.  
This makes Homey recognize the capability and create flowcards for it, and place it in the correct screen.

If you disable the CreateFlowCards, then all capabilities will be linked so that Homey does not recognize the capability.

Only one type of each default capability can be used to create flows.

**Yeah, Full control over your device!**

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

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