How to get virtual device to show text from variable?

Hey Homeys!

In this thread I try to get help to convert wind angle in degrees to N, E, S, W and so on.

I have been able to create a flow (copying one of the answers in the thread) that does the conversion the way I want. I confirmed this by using notifications when the wind direction changes so now I get phone notification with the correct letters corresponding to the wind direction. However I’m stuck at the next step: displaying the result in Homey.

I have created a virtual device and tried to point to it from the flow but if I choose the sensor device and use the device capability “measure_wind_angle” the VD expects a numerical value and since the variable I created reports letters nothing is displayed in the VD. I then created a new VD using speaker and the capability “speaker_artist” and that gave me this:

:sweat_smile:

As you can see the vind direction “NV” is displayed but it looks a bit corny with the note symbols. Also, the wind direction does not show on the device icon, which is what I want.

Is there no device alternative with a device capability that is just text from a variable?

How can I solve this last step of the flow?

Cheers!

Use an Advanced virtual device instead.
You can set the device status to anything you like.

When you use a Better Logic string-variable instead of the build-in variable, it shows the value without needing additional flows to set the status:

Example, I created a Better Logic variable called Wind_angle
AVD settings:

Next, select Textfield 1, which I called WindAngle, as Status Indicator:

So, as soon as the value of the variable changes, it’s new value is shown as status indicator right away.

1 Like

Thank you Peter! :pray: :smiley:

I had found Advanced Virtual Devices and tried to get it to work…but I couldn’t remember how to create a Better Logic variable. :flushed: I can see in the list that I have done it before…but that was a long time ago and I haven’t done it since.

I finally found the way and followed your instructions. All went well until I was supposed to set the Status Indicator. The field was greyed out… :thinking: Head scratching ensued until I realised that your screen shots was from a phone (I do most of my Homey stuff in the web GUI). Opened up the app and clicked the AVD and settings…there it was! :smiley: Now it looks like this in my phone:

However…in the web GUI the Status Indicator menu is still greyed out and there is no letter on the icon. If I click the icon to open up the device it looks great but I was hoping to be able to see the wind direction letter(s) in the icon.


1 Like

YW!

Correct, the web app isn’t aware yet we can use text as status indicator (since Aug. 2023), so it just don’t shows them as selectable.

When you pick the web app ‘small’ tile view

It simply sais: NaN (Not a Number)

While it’s showing fine at the mobile app:

Actually…if I chose big icons in the web app it does show up:

So the web app is aware…but something stops it from displaying it in small icon mode.

Yes, that’s true, the “big” tile shows all capabilities.
But the ‘Status indicator’ part just seems to have missed some love.

1 Like