How to convert text to number variable

I’m struggling with data type conversion…

I have a web hook event that sets my electricity meter reading every 5 seconds. This will always be a number but the webhook only uses a text tag.

There is a convert text to number-tag card, but it doesn’t seem to do anything to the text tag, make another tag available, or anything. Ultimately I want to set a number variable so I can later use less than/more than logic on it, but i can’t get that far because the flow won’t let me set a number variable to the value of a text tag.

How is this convert card supposed to be used? (I am on homey pro web with local homey bridge)

Thanks

Create a numeric variable
Use the Logics THEN “calculate a value” card
Pick your numeric variable and the textvariable as seen in my example flow below.
→ you should pick the local variable from your webhook.
Keep in mind to delay the card that is used to use the converted text to num variable, while the action flowcards are fired at once (asynchronious).

@Peter_Kawa Thanks so much, I was using the wrong card. That works using the “calculate a value”. I am still interested to know how the “convert” card is supposed to be used.

1 Like

You’re welcome, @parody !

At first I didn’t get which card you meant, but a bell rang today :stuck_out_tongue_winking_eye: , and I found it. I just tested it and it works.

I guess you did not draw a line between the logics card output and other card input, before you tried to make it work.
Only when the cards are connected, the local tag [Result] becomes available.

String variable:
Screenshot from 2023-03-25 17-44-01

Flow:

The homey pro cloud flows do not have lines, just more simple IFTTT style.

Ah my bad.
On the cloud version, I can’t find this card:

Or do you get more cards then this set when you have Premium?

Can you post a screenshot of that card?

Yes I have 18 in total, here are some of them including those converts

I’m a bit confused about the Homey model you own. :hugs:

For clarity: Homey Pro = white ball
Homey Pro 23 = hockey puck
Homey bridge, an accessory to Homey Cloud (the Homey app without hardware) = hockey puck

That is really odd, the cards with “as xxx-tag” are only available for the advanced flow (with the lines) afaik…
And advanced flow is only available on Homey Pro

Even on a Pro these cards you show are not available in standard flow (the top to bottom system) because you can’t do anything with the tag in standard flow…

What does HomeyModelName say, when you check here?
https://tools.developer.homey.app/tools/system

This is what Homey Cloud returns:

Only with advanced flow I can choose from the cards you showed

I’m sorry, let me get my terminology correct.

When I said web I mean cloud.

When I said pro I meant premium.

So I have a bridge locally, and cloud premium.

I did it this way to experiment before diving into the pro, with the plan of using the bridge as a satellite in the end.