[APP][Pro] Advanced Virtual Device (Device Capabilities App) with Unique Text Status Indicator

When I chose a field of an AVD with a percentage as “Status Indicator” of the tile, it appears with a 100 times larger value. So it seems there is a conversion going on.

image

@Rmb
Show the field configuration?


@Rmb
If you remove the percentage symbol in the Unit, what happends than?

When I remove the percentage sign from the unit field, it shows every where as 5.

@Rmb
Hahah, than i guess athom has made the calculation based on the percentage symbol.

Either change the Unit or use 0.05 i guess.

Change the unit. When I enter 0,05% it will show up as 5%. So using the percentage sign the value in the Status Indicator is always 100 bigger. Maybe I can fake something by using the BLL format and just display it 100 bigger. Hoping it will not show up as 100 x 100 bigger.



image

As an alternative/work-around, you may want to consider using a text field based sensor as a status indicator. Whenever your percentage value changes, you then trigger a flow that combines the percentage value and percentage sign in a BLL text variable. That variable can then be used as a basis for the text field based sensor value and hence the status indicator. That way you’ll see both 5% as status indicator as well as on the sensors tab.

1 Like

I think it is a Athom bug/definition thing… See picture below. Selected 0.9% is displayed as 90%. See also Lamellas - run down and then tilt - #27 by robertklep
Athom has fallen into their own trap.
It has to do that a parameter which defines a percentage is always between 0 and 1.

That work around is OK. Just had to find the right BLL expression.

(When trying another solution I managed to massign a text field in de AVD the value $value.toString() but did not succeed in adding another text to this string.)

Just to verify:

  • Your AVD is configured with a text field, which you select as status indicator
  • This text field is based on a BLL variable (via the reflect option)
  • You update/create the value of that text variable via a flow.

Here is an example of one of mine climate AVDs. The status indicator shows the average temperature and average humidity.

IMG_1521

The status indicator is based on a text field (called ‘Status’), which in turn reflects a BLL variable (‘bllKlimaatStatus’):

As part of a flow I update the BLL variable to any text I want. In this case it combines the average temperature value (which is a variable in itself) with the degrees Celsius sign as well as the rounded average humidity value (again another variable) with the percentage sign.

So you can combine variables, tags and text characters to create any status indicator text.

I built your solution, but did just not reflect a BLL variable but filled the text field with a BLL expression, consisting of a number transferred to text and added the % sign.

But I also made a solution without the extra flow, just using a BLL expression to transform the reflected number to a string. But that one was not successfull (yet). To be precise:

 $value.toString()                            Works, to reflect a number in a text field
 $value.toString().concat(“%”)        Did not work, I have check for smart quotes😀

Try

$value.toString().concat("%")

The problem was caused by smart quotes.
This works without an flow:

2 Likes

Well, perhaps also.
But you also didnt have parentheses after the toString :wink:

I learned my lessons, I should have copy/paste the code to prevent typing error on typing error.:grin:

1 Like