# How can I save a tag as an integer instead of a float?

**URL:** <https://community.homey.app/t/how-can-i-save-a-tag-as-an-integer-instead-of-a-float/75262>\
**Category:** Flows\
**Tags:** advancedflow\
**Created:** [January 18, 2023, 10:35am UTC](https://community.homey.app/t/how-can-i-save-a-tag-as-an-integer-instead-of-a-float/75262 "2023-01-18T10:35:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pierre\_van\_Lier](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pierre_van_lier/32/56539_2.png) [@Pierre\_van\_Lier](https://community.homey.app/u/Pierre_van_Lier)\
**Post date:** [January 18, 2023, 10:35am UTC](https://community.homey.app/t/how-can-i-save-a-tag-as-an-integer-instead-of-a-float/75262/1 "2023-01-18T10:35:36Z")

</div>

I built an advanced flow that connects with four Homewizard devices during daytime to pull the power my solar panels generate. I then want to upload the data to a Google Sheet.

Apps used: Logic, Json Handler and Google sheets.

Basically the flow works, however, the number tags sometimes are stored as text instead of a float or integer. Which messes up my spreadsheet.

I think this is caused by the decimal separators and can’t get it fixed. I do not need numbers with three decimals. So my question is: How do I force the tag (Nummer 1) generated to be an integer instead of a float? I’ve tried {{round(x,0)}} but can’t get it to work properly.

 ![SCR-20230118-g14](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/7/1/714acaef61c96d870de82926075b3db44618f5fe.png)

---

<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:** [January 18, 2023, 11:46am UTC](https://community.homey.app/t/how-can-i-save-a-tag-as-an-integer-instead-of-a-float/75262/2 "2023-01-18T11:46:27Z")

</div>

With the numeric “calculate as” card, you can select stringVars, and save their numeric (_make sure it holds numbers only_) value in a numVar. You can also round to zero digits in one go  
This works `{{round([YourStringVarHoldingNumbersOnly],0)}}`

> ![Screenshot from 2023-01-18 16-16-58](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/a/f/afcaa8b052df2cd95ade51b8c361ca1854e72725.png)

> ![Screenshot from 2023-01-18 16-17-43](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/e/f/ef368721612e818cdeec9173e4e687144f71c6a4.png)

---

<div class="post-metadata">

**Author:** ![Pierre\_van\_Lier](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pierre_van_lier/32/56539_2.png) [@Pierre\_van\_Lier](https://community.homey.app/u/Pierre_van_Lier)\
**Post date:** [January 19, 2023, 8:19am UTC](https://community.homey.app/t/how-can-i-save-a-tag-as-an-integer-instead-of-a-float/75262/3 "2023-01-19T08:19:43Z")

</div>

Thank You, I have altered the flow, and it works.

 ![SCR-20230119-cw8](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/4/a/4a2a57de78209fda33cd68304168791ed6971b33.png)
