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

<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:** [October 3, 2022, 2:36pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/769 "2022-10-03T14:36:22Z")

</div>

> [@Peter\_Kawa](#):
>
> So the two top cards are triggered by default? Just to be sure 😉

Euhm, yes, All normal default flowcards are not managed by me, so yeah, this one does gets triggered “always”.

---

<div class="post-metadata">

**Author:** ![Undertaker](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/undertaker/32/53278_2.png) [@Undertaker](https://community.homey.app/u/Undertaker)\
**Post date:** [October 3, 2022, 3:12pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/770 "2022-10-03T15:12:07Z")

</div>

> [@Arie\_J\_Godschalk](#):
>
> Aber du bringst mich auf eine sehr, sehr gute Idee, einen weiteren netten Homey-„Hack“ auszuprobieren!

I like your ideas and am excited…

---

<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:** [October 3, 2022, 3:13pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/771 "2022-10-03T15:13:04Z")

</div>

@Undertaker  
Hey all,

New in Live now: Flow script import at the end of a AVD creation from a Template (or TEF):  
All you need to do to import a AVD with its flows from template (or TEF) is:

## Read and create the Device and the Flow script

- Create a new Advanced Virtual Device and a Select from the Templates, and press Use Template.
- After the AVD(s) is/are created, you will get a overview of items that are to be replaced with your own items, like devices, zones, variables, etc.
- Set Your Devices:  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/6/b/6b400551341b230b2fdf9e1c6ac5d1f94b7fac87.png)  
(Light switch (other) will be filled with the current/new device name, leave it that way).
- Now press Update Text.
- Run the text given in the textfield in the API Playground.  
(It will be in your clipboard after clicking the link)

---

<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:** [October 3, 2022, 3:13pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/772 "2022-10-03T15:13:48Z")

</div>

If anyone has a sugestion how to make it even iesier, let me know.

---

<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:** [October 3, 2022, 4:54pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/773 "2022-10-03T16:54:04Z")

</div>

Very impressive again, Arie!  
This is never gonna stop haha.

I have 3 suggestions,

- when you hit “Read device”, it copies the imported device name, instead of the device name one enters before hitting the magic button  
Can that be turned into a choice, like:  
_Use Default name, or entered name?_

![Peek 2022-10-03 18-51](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/5/35caccb241e6f2f7ceca288e2194deb1cd25365d.gif)

- The title here, something like “Edit flow prior to import”  
 ![Screenshot from 2022-10-03 18-45-48](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/4/1/41dabbcd444307afe346668cee670ffcf3fbecff.png)

- Is it an idea to rename the tab  
_Open share your device_  
to  
_Import/Export your device_

---

<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:** [October 3, 2022, 7:49pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/774 "2022-10-03T19:49:44Z")

</div>

> [@Peter\_Kawa](#):
>
> when you hit “Read device”, it copies the imported device name, instead of the device name one enters before hitting the magic button  
> Can that be turned into a choice, like:  
> _Use Default name, or entered name?_

Good idea.

> [@Peter\_Kawa](#):
>
> The title here, something like “Edit flow prior to import”

Updated.

> [@Peter\_Kawa](#):
>
> Is it an idea to rename the tab  
> _Open share your device_  
> to  
> _Import/Export your device_

Nah, since the whole AVD-export part is called Share Your Device, i’ll leave it for the moment like this.  
If it turns out people are confused, then we can always changed it.

---

<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:** [October 3, 2022, 7:51pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/775 "2022-10-03T19:51:10Z")

</div>

Now Live, improved translations and finishing the Creation AVD views (more).

---

<div class="post-metadata">

**Author:** ![Erikje](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/erikje/32/8240_2.png) [@Erikje](https://community.homey.app/u/Erikje)\
**Post date:** [October 3, 2022, 9:13pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/776 "2022-10-03T21:13:53Z")

</div>

Is it true, that a virtual device e.g. a lamp does not show up in google. Or am I overlooking something when creating it? Because I want to transfer all my virtual devices I created to this app. When I create a virtual device in the other app (virtual device), and then sync with Google, it gets there. But not with this app unfortunately. Thanks in advance

---

<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:** [October 3, 2022, 10:53pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/777 "2022-10-03T22:53:13Z")

</div>

Thats odd, I didn’t check earlier, but several AVD’s here are present in GHome  
I think it has to do with which device class you pick, or if it has a device on/off function aboard, or sensor, of thermostat, window coverings… all by GHome supported device types should pop up in GHome.

---

<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:** [October 4, 2022, 6:58am UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/778 "2022-10-04T06:58:00Z")

</div>

You need to ~~set the class to Light, and~~ create a onoff with(!) Create flowcards enabled.  
Then is it seen as a real lamp, like always.

---

<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:** [October 4, 2022, 11:26am UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/779 "2022-10-04T11:26:51Z")

</div>

Ah, I see, creating the flowcards for on/off is a must.  
When that is present, and the device class is ‘other’, it works as well.

And look how nice with avd’s for blinds in GglHome:

 ![Screenshot_20221004-132854_Home](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/9/d/9d1f1598a2ce6bf8f8df4c8918fd2e7bd3021c21.jpeg)

The original (… tuya) don’t display the % value, and can’t be manually operated (only by voice)

The avd:

 ![Screenshot_20221004-133041_Home](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/0/30eaa5e04aca6403c33dec5484b315a1877dbe74.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:** [October 4, 2022, 1:07pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/780 "2022-10-04T13:07:24Z")

</div>

Please, anyone, everyone, help me:

**I need a beter description for the property: Create Flowcards.**  
What it does:  
It makes the fields ShowAs the real deal.  
So if you select OnOff and set Create FlowCads to true, the AVD will get a real OnOff property, which is recoqniced by Homey and other Apps as a device having a real OnOff button.  
This is why you also get Flowcards.  
(Only one type ShowAs with Create Flowcards can exists, a Device can only have one real OnOff button, or one real Dim)

Same goes for f.i. measure\_temperature, etc.

---

<div class="post-metadata">

**Author:** ![Erikje](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/erikje/32/8240_2.png) [@Erikje](https://community.homey.app/u/Erikje)\
**Post date:** [October 4, 2022, 4:48pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/781 "2022-10-04T16:48:15Z")

</div>

I did indeed do that last time, but really didn’t come up in google. I started all over again now, and it does come up now. Very strange maybe I saved a different class the first time so it doesn’t change and therefore doesn’t come up in google as well? In any case thank you very much for your thoughts

---

<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:** [October 5, 2022, 11:40am UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/782 "2022-10-05T11:40:46Z")

</div>

I have just added another Flowcard to Test (in review by Athom).

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

You will get a JSON containing all (advanced) flows which contain the selected items.

You can filter the items that is looked for:  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/6/8/68ffbbac000e43b904e3948cdc0d82c688acb95c.png)

Use

- test
- c31ecacc-26fe-448e-ab00-d109618c8382
- Device Cap\*
- [{id:‘f6ef2b6f-e3f2-4ecf-a205-4f919a7a6d3f’}, {name:‘Test AVD’}]

---

<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:** [October 5, 2022, 2:34pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/783 "2022-10-05T14:34:29Z")

</div>

> [@Arie\_J\_Godschalk](#):
>
> I need a beter description for the property: Create Flowcards.

I thought about:  
“Create real capability + Flowcards” with an explanation like  
“Only 1 per type allowed (like OnOff/YesNo/Thermostat); But, virtual capabilities may use unlimited equal capabilities”

---

<div class="post-metadata">

**Author:** ![Erikje](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/erikje/32/8240_2.png) [@Erikje](https://community.homey.app/u/Erikje)\
**Post date:** [October 6, 2022, 1:49pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/784 "2022-10-06T13:49:20Z")

</div>

Could you maybe make the option in it, that you can also calculate a number with variable? Like example:

 ![Screenshot_20221006_154521](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/1/f1161e7eda58e7ba53157195c007d152df72ff5a.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:** [October 6, 2022, 2:02pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/785 "2022-10-06T14:02:31Z")

</div>

> [@Erikje](#):
>
> Could you maybe make the option in it, that you can also calculate a number with variable? Like example:

There is an Set [expression] card, which allows for javascripts calculations to be used.  
Use can set functions to be used in the App Settings–\> Functions.

See the topic main text above and goto: [Setting and Using Functions](https://community.homey.app/t/app-pro-advanced-virtual-device-device-capabilities-app-with-unique-text-status-indicator/68198#setting-and-using-functions-12)

---

<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:** [October 6, 2022, 2:03pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/786 "2022-10-06T14:03:18Z")

</div>

But for this we first add a function in **App** settings.  
We go to the bottom, fill in average and press add function:  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/f/0fa05ce410c562352f4caa7ba23463511a39b629.png)  
Then we scroll down and press on edit, and fill in the function:

```auto
function () {
  var sum = 0.00;
  for( var i = 0; i < arguments.length; i++ ){
      sum += parseFloat( arguments[i], 10 );
  }
  return sum/arguments.length;
 }

```

_Please note that you don’t give the function a name in the codefield, but in the namefield._  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/7/e/7ebcc57455fe8f8e7f50c2914a0c24f10404bbf9.png)

No we go back to the flow for the curtains.  
For this we use a Set field to Expression card:  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/8/7/878edf5dc83202eafb4de348a635ad40a4c05898.png)

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

And here we use the average function from the App Settings.  
All the number tags are **not** from the flowcards (because only one trigger triggers the flow), but the tags from the curtain-devices.

And once again, tada! We can now close all curtains in the Living room with one button, next to the tv button 🙂

---

<div class="post-metadata">

**Author:** ![Erikje](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/erikje/32/8240_2.png) [@Erikje](https://community.homey.app/u/Erikje)\
**Post date:** [October 6, 2022, 2:28pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/787 "2022-10-06T14:28:15Z")

</div>

Ow thank you very much, this indeed works

---

<div class="post-metadata">

**Author:** ![Erikje](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/erikje/32/8240_2.png) [@Erikje](https://community.homey.app/u/Erikje)\
**Post date:** [October 12, 2022, 6:33am UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/788 "2022-10-12T06:33:37Z")

</div>

I actually have a question about the ‘watch’ function. In fact, I created the flow below to test it. But I get the same response every time. Even though I ask via google to turn on the lamp or via the flow. Am I doing something wrong?

 ![Screenshot_20221012-082636_Samsung Internet](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/c/fc61ab9cb1c6a28d9fa092914621234891e8515f.jpeg)  
 ![Screenshot_20221012-082459_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/4/2/42bb387bf603edcf9ee292e5dda28df7fe66f43c.jpeg)  
 ![Screenshot_20221012-082417_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/5/d/5db1e7e03478ab056ff004164367994254166faa.jpeg)

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

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