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

Yes, the problem is solved.
But you still wanted a ticket?
I was a bit surprised, but I have fulfilled your wish.

Sorry about my English, it’s deepl translated.

That one was for someone else :wink:
Sorry, i thought you could see to whom it was replied. :slight_smile:

i understand exactly how your great app works. however, I can’t find how to show multiple data on a tile. Could someone help me out a bit.

That’s explained in the separate Adv. virtual device topic:

Or the Share your adv. virtual device topic: Share Your Device! - Advanced Virtual Devices from Device Capabilities

Links are to be found in post #1

@Peter_Kawa and others,

I just added another flowcard:
When [[device]].[[capability]] is [[condition]] [[value]] for [[time]] [[unit]], execute [[trigger]].

This card will execute when a certain capability from a device has been a certain value for a specific period.

For instance:

  • When a (Chronograph) timer has been started for 10 seconds, this flowcard will be executed once.
    Once meaning: every time the condition is wrong and then correct, it will be triggered once.
    image

  • When the next Timer duration is less than 600, every 10 seconds (from the moment the value first met the condition) the flowcard will be triggered.
    image

Ofc you can use this for other things thatn timers :wink:
It was just handy to test with.

This flowcard handles app restarts.
Only thing it cannot know is if, during the app restart, a condition of device.capability is turned wrong and than correct again during the time the DC App is down.

It’s in test now:

3 Likes

Wow this is strong! That replaces allot of flows!

1 Like

@JB2K , can you share some more examples please ?

Well, here is someone (in dutch) who wanted a trigger for when the Fridge is using less power than 20w for more than 3 hours:
Advanced flow actie op periode van tijd een bepaalde conditie - :netherlands: Nederlands (Dutch) / Vragen & hulp - Homey Community Forum

The flowcard for that would look like this:
image

4 Likes

Hmm, maybe I will improve my “it’s dark” flow / conditions :wink:
And probably some temperature based conditions, eg. for running flow when certain temperature is reached … or turning off LED on Homey, when temperature is longer time above certain temp…ok, got it :wink:

Thank you @Arie_J_Godschalk , again reached another level for Homey !!!

4 Likes

Thanks m8!

And, it took me way more hours than expected, especially to:

  • Make sure it works after app restart.
  • Works when updating flows, but should not reset timers.
  • Share capability/devices listeners to preserve memory.
    (it’s shared with the listener flowcards also :slight_smile: )
  • Clean up all listeners and timers when you change a flow, so, you will not need an App restart for clearing memory :slight_smile:

I have tested it in many difference ways and hope it’s bug free.
But since it was pretty complicated, i leave it in test for the moment and hope people will test it and report back to me if the find any issues.

5 Likes

Thanks a lot! This will make life much more easy!

1 Like

Hi all,

I have a BLL expression question.

My window screens are representing there state in a fraction. 1(.0) is full up, 0 is down and 0.66 is 34% down.

Is it possible that on my ‘advance virtual device’ the value is not shown in a fraction but in a % and if possible inverted? So it is not showing 0.66 open but 34% down?

I’m trying a lot of but still does not understand the BLL expression. My first try was to make a % from a fraction. (Tried; Math.round($Value*100) ) but not working.

Is there anybody who can help me how to formulate the BLL to format it as a % and if possible ‘inverted’ so is is showing how many % it is ‘down’ instead of ‘up’?

Many thanks for any help!

@Ranney Show me a printscreen of the AVD settings with this field please?

What does this mean: It’s not working? What is happening if you do it like that?

This is the adv device screen:

The device is (still) showing the current position in a fraction:

I’m trying to make it so that is is showing XX% down (so 0% is UP) and not 0.66 up. :smiling_face:

Many thanks for your help Arie! Will donate you a coffee/beer again today. :muscle:

Ah, well first thing first: Remove it as status indicator: That one is not ment for this, it’s a special field. Altho i guess it can be used for this, it has no advantages to use the Status indicator, only less options that you want! It’s better in this case to use a Number field, it will allow for more options, like Unit, min, max, step. (altho this is not needed ofc, just fyi).

But the main issue of the BLL expression not working: Your BLL expression is wrong, you have $value with a capitall V. Write it with with lowercase v.

And to invert it, just simple put it like this:
Math.round((1.0 - $value)*100);

I made it 1.0 so it’s always calculated as a float number, just to be sure.

1 Like

Ahh, that makes it possible to get it working in %, thanks!

The reason that I was using that ‘status indicator field’ is that I like the functionality to show that to the device icon:
Scherm­afbeelding 2023-05-24 om 15.04.17

I think that that is the only way to get it working to use that 'status indicator field? (So I cannot add a ‘%’ unit behind it?)

Yeah, use the status indicator flowcard and set the text to %.
That should work.
However, im gonna check something about this, one sec.

1 Like

Nice! Whatever I try, it is always showing ‘34 screen’. Not a new name or ‘%’. (Even not after removing the ‘status indicator’, saving and re-adding. Of course I do something wrong, but… Just have to find out what :smiling_face:



Not sure why.
But, install the current test version.
I just had a clear moment :slight_smile: and have added a new ShowAs field: Sensor (Status):
image

Now you can select this one as Status Indicator in the Homey App.
Just set the Units here, and use the normal Set Numberfield card (or Reflect) to set the number part of the indicator:
image

Have fun!

(Update coming for icon and small fixes, hang on).

2 Likes