# How to convert text to number variable

**URL:** <https://community.homey.app/t/how-to-convert-text-to-number-variable/78332>\
**Category:** Questions & Help\
**Tags:** homey-pro, homey-bridge\
**Created:** [March 24, 2023, 4:17pm UTC](https://community.homey.app/t/how-to-convert-text-to-number-variable/78332 "2023-03-24T16:17:56Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [March 25, 2023, 8:22am UTC](https://community.homey.app/t/how-to-convert-text-to-number-variable/78332/2 "2023-03-25T08:22:31Z")

</div>

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).

> [@MQTT NodeRed values](https://community.homey.app/t/mqtt-nodered-values/60459/4):
>
> If the topic “text” contains only numbers, you can create a numeric variable from the text variable [message received from] Example to “Convert” a textvar which holds only numbers, to a numvar: . If numvar changes, set color to the value stored in [numvar]: Probably this app is interesting to you

---

_[View the full topic](https://community.homey.app/t/how-to-convert-text-to-number-variable/78332)._
