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

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

1 Like

I like your ideas and am excited…

2 Likes

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

    (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)
2 Likes

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

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

  • The title here, something like “Edit flow prior to import”
    Screenshot from 2022-10-03 18-45-48


  • Is it an idea to rename the tab
    Open share your device
    to
    Import/Export your device
1 Like

Good idea.

Updated.

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.

1 Like

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

1 Like

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

1 Like

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.

1 Like

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.

1 Like

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:

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

The avd:

1 Like

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.

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

1 Like

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

image

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

You can filter the items that is looked for:
image

Use

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

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”

1 Like

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

1 Like

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

1 Like

But for this we first add a function in App settings.
We go to the bottom, fill in average and press add function:
image
Then we scroll down and press on edit, and fill in the function:

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

No we go back to the flow for the curtains.
For this we use a Set field to Expression card:
image

And here we use the average function from the App Settings.
All the number tags arenot 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 :slight_smile:

Ow thank you very much, this indeed works

1 Like

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?



1 Like