# \[APP\]\[Pro\] Flow Utilities

**URL:** <https://community.homey.app/t/app-pro-flow-utilities/53027>\
**Category:** Apps\
**Tags:** tools, homey-pro\
**Created:** [October 12, 2021, 10:05am UTC](https://community.homey.app/t/app-pro-flow-utilities/53027 "2021-10-12T10:05:25Z")\
**Posts on this page:** 20\
**Page:** 8

<div class="post-metadata">

**Author:** ![Pieter\_Pessers](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pieter_pessers/32/8848_2.png) [@Pieter\_Pessers](https://community.homey.app/u/Pieter_Pessers)\
**Post date:** [April 10, 2023, 3:20pm UTC](https://community.homey.app/t/app-pro-flow-utilities/53027/143 "2023-04-10T15:20:29Z")

</div>

Hello Robbert.

Thanks for you reply. My homey language is on dutch and location in the Netherlands. Still it keeps rounding the numbers.

3,00 becames 3 and 3,40 becomes 3, 4 euro’s. But it seems the problem is not the app, but in the homey?

---

<div class="post-metadata">

**Author:** ![RobbertV](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robbertv/32/37250_2.png) [@RobbertV](https://community.homey.app/u/RobbertV)\
**Post date:** [April 10, 2023, 3:40pm UTC](https://community.homey.app/t/app-pro-flow-utilities/53027/144 "2023-04-10T15:40:03Z")

</div>

Hi Pieter,

I’m sorry, I spoke to soon. I did not correctly understand your issue. Thanks for giving extra examples.  
So If I understand you correctly when passing a number 3 it will return “3 euro” instead of “3,00 euro”? And “3,40” will return “3,4 euro”?  
In that case that is not correct, and is maybe an issue in the app or something to do with JavaScript. But we can debug that.

Is this on Homey Pro or the new Homey Pro 2023?

---

<div class="post-metadata">

**Author:** ![Pieter\_Pessers](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pieter_pessers/32/8848_2.png) [@Pieter\_Pessers](https://community.homey.app/u/Pieter_Pessers)\
**Post date:** [April 10, 2023, 4:10pm UTC](https://community.homey.app/t/app-pro-flow-utilities/53027/145 "2023-04-10T16:10:25Z")

</div>

Hello Robbert. It is the other way around. I want 2 decimals after the comma. I used round(number,2) but sometimes it makes it even numbers. But i like it when it says 3,00 instead of 3. I see this also on the flow utilities app. Even withe euro valuta.

I have the HP2019 pro, but i already ordered the HP2023.

Verzonden vanaf mijn Galaxy

-------- Oorspronkelijk bericht --------

---

<div class="post-metadata">

**Author:** ![RobbertV](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robbertv/32/37250_2.png) [@RobbertV](https://community.homey.app/u/RobbertV)\
**Post date:** [April 10, 2023, 6:45pm UTC](https://community.homey.app/t/app-pro-flow-utilities/53027/146 "2023-04-10T18:45:18Z")

</div>

Thanks I will have a look. Will let you know.

---

<div class="post-metadata">

**Author:** ![Pieter\_Pessers](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pieter_pessers/32/8848_2.png) [@Pieter\_Pessers](https://community.homey.app/u/Pieter_Pessers)\
**Post date:** [April 10, 2023, 6:57pm UTC](https://community.homey.app/t/app-pro-flow-utilities/53027/147 "2023-04-10T18:57:17Z")

</div>

Thank you Robbert. Appreciate it.

---

<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:** [April 10, 2023, 11:01pm UTC](https://community.homey.app/t/app-pro-flow-utilities/53027/148 "2023-04-10T23:01:48Z")

</div>

If I may interfere, as far as I know it is a Homey (201x) issue, it is not (well) prepared for currency numbers, and it removes all trailing zeros from values.  
(no clue if v10.x firmware finally fixed this issue)

These are currency values from PowerbytheHour for instance.  
This device shows currency values with 4 digits, but Homey removes the trailing zeros:

 ![Screenshot from 2023-04-11 00-52-39](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/4/2/421f62ecc8d091184ea5f8e4505aa853b22d5fac.png)

And with regular currency values, the two digits become 1 or zero when the last figures is/are 0:  
 ![Screenshot from 2023-04-11 00-53-35](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/5/0/50c4c474329635653f8ab747feef5bfd2739ecde.png)

---

<div class="post-metadata">

**Author:** ![RobbertV](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robbertv/32/37250_2.png) [@RobbertV](https://community.homey.app/u/RobbertV)\
**Post date:** [April 11, 2023, 10:05am UTC](https://community.homey.app/t/app-pro-flow-utilities/53027/149 "2023-04-11T10:05:07Z")

</div>

Hi Pieter,

Unfortunately I can reproduce the issue you are facing. When testing with both numbers homey will remove trailing zero’s (since this is a number value, this is normal behaviour for Javascript/NodeJS what Homey uses as scripting language)

See examples below for:  
**Homey Pro 2019**

 ![Scherm­afbeelding 2023-04-11 om 11.02.45](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/e/e/eeb2f7d59fc3910563c325d174c1c1705f62bea5.png)

**Homey Pro 2023**

 ![Scherm­afbeelding 2023-04-11 om 10.57.09](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/7/b/7bfd61cd9c7060cabdbf90b8baed0e5b11de1b01.png)

Can you share your flow setup, maybe by using extra code validation the numbers are getting lost?

---

<div class="post-metadata">

**Author:** ![RobbertV](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robbertv/32/37250_2.png) [@RobbertV](https://community.homey.app/u/RobbertV)\
**Post date:** [April 11, 2023, 10:10am UTC](https://community.homey.app/t/app-pro-flow-utilities/53027/150 "2023-04-11T10:10:19Z")

</div>

This sounds more like normal number behaviour for Javascript. If you store a number type value “3.00” it will remove the trailing zero’s.

To resolve this for Flow Utilities I use the ` toLocaleString` method. This also gives the benefit of showing different writing of € for different country’s. Some will show: “€ 3,00” but some countries use: “3,00 €”.

---

<div class="post-metadata">

**Author:** ![Pieter\_Pessers](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pieter_pessers/32/8848_2.png) [@Pieter\_Pessers](https://community.homey.app/u/Pieter_Pessers)\
**Post date:** [April 11, 2023, 12:40pm UTC](https://community.homey.app/t/app-pro-flow-utilities/53027/151 "2023-04-11T12:40:36Z")

</div>

Hello Robbert.

I don’t know what i did wrong, but it looks like following your example on the letter helped me. On this moment it seems toe be working.

Thank you for your app and support.  
I will sent you a small donation to by you a beer.

---

<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:** [April 11, 2023, 4:03pm UTC](https://community.homey.app/t/app-pro-flow-utilities/53027/152 "2023-04-11T16:03:36Z")

</div>

Hi Robbert,

> [@RobbertV](#):
>
> This sounds more like normal number behaviour for Javascript. If you store a number type value “3.00” it will remove the trailing zero’s.

That’s true, and I now see you have implemented a kind of ‘fix’ (in my eyes) in your app _and I didn’t know yet_ 😉

What I only tried to say was, I think Athom should implement something for currency cababilities like you did, with `toLocaleString` (I’m no coder). I’ll send them a request for that.  
I understand this changes a float type to a string type, and with string type values no characters are getting removed anywhere in Javascript.  
And to be able to do currency value calculations, there should be a set of string and num type variables for every currency value as I understand.

Thanks

---

<div class="post-metadata">

**Author:** ![RobbertV](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robbertv/32/37250_2.png) [@RobbertV](https://community.homey.app/u/RobbertV)\
**Post date:** [April 11, 2023, 7:23pm UTC](https://community.homey.app/t/app-pro-flow-utilities/53027/153 "2023-04-11T19:23:27Z")

</div>

To be able to calculate you need a number type of value. A string value is intended for normal text and is therefore untouched, but unable to do calculations with.

So indeed you need to have both types of them. It’s a bit confusing for non developers indeed 😅 and also complicated to make a good workflow for end users.

---

<div class="post-metadata">

**Author:** ![Rrrr](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rrrr/32/629_2.png) [@Rrrr](https://community.homey.app/u/Rrrr)\
**Post date:** [April 21, 2023, 4:30pm UTC](https://community.homey.app/t/app-pro-flow-utilities/53027/154 "2023-04-21T16:30:21Z")

</div>

Good news from Athom. Improved integration for Hue motion sensors.

> [@Hue motion sensor](https://community.homey.app/t/hue-motion-sensor/8057/42):
>
> Update from today. At least some good news be it without timeline or if it covers all models: We are sorry to hear about your frustration about the polling interval of the philips Hue app. But I have some good news. I’ve talked to development about this and they have said there will be an update in the near future that removes polling for motion sensors entirely and will work on the eventstream principle making them respond much faster! So this is already in the works since we’ve also noticed t…

---

<div class="post-metadata">

**Author:** ![LRvdLinden](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/lrvdlinden/32/80786_2.png) [@LRvdLinden](https://community.homey.app/u/LRvdLinden)\
**Post date:** [August 7, 2023, 10:31am UTC](https://community.homey.app/t/app-pro-flow-utilities/53027/155 "2023-08-07T10:31:51Z")

</div>

Hi @RobbertV can you make a action card to set a variable to any number?

---

<div class="post-metadata">

**Author:** ![RobbertV](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robbertv/32/37250_2.png) [@RobbertV](https://community.homey.app/u/RobbertV)\
**Post date:** [August 8, 2023, 6:43pm UTC](https://community.homey.app/t/app-pro-flow-utilities/53027/156 "2023-08-08T18:43:59Z")

</div>

Hi @LRvdLinden,

I’m not sure, why that is needed. Most of the app variables are either string type or used for calculations outcomes. Otherwise you could use normal number values or normal variable values to do calculations in action cards.

Maybe you can give me an example use case to understand your feature request better?

---

<div class="post-metadata">

**Author:** ![JMH](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jmh/32/29230_2.png) [@JMH](https://community.homey.app/u/JMH)\
**Post date:** [October 5, 2023, 6:15am UTC](https://community.homey.app/t/app-pro-flow-utilities/53027/157 "2023-10-05T06:15:39Z")

</div>

@RobbertV @martijnpoppen  
Is it possible to make an action card to replace text?

I would like to do some textmarkup in messages sent with Telegram, like make some words bold or italic or underline a part of a string. Or sometimes I want to remove some text in strings I receive (replace with nothing).

Hope you guys can add this to your usefull app!  
Thanks in advance.

---

<div class="post-metadata">

**Author:** ![RobbertV](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robbertv/32/37250_2.png) [@RobbertV](https://community.homey.app/u/RobbertV)\
**Post date:** [October 8, 2023, 9:47am UTC](https://community.homey.app/t/app-pro-flow-utilities/53027/158 "2023-10-08T09:47:51Z")

</div>

Hi @JMH,

We can make an action card to replace certain content with something else.  
You can then provide a matching string or regex for the targeted string to be replaced. But this means that in order for it to work that incoming string needs to have the same value (part) set every time.

However reading you request, I think you want to have the matching value to be in the new formatted code as well, am I right? Because default behaviour would literally replace the matching text for new.

**Example without keeping content:**  
Input: `my string with some content`  
Replace ‘some content’ → `**` (`** => bold`)  
Outcome: `my string with **`

**Example with keeping content:**  
Input: `my string with some content`  
Replace ‘some content’ → `**` (`** => bold`)  
Outcome: `my string with **some content** `

You know text markup can already be done in strings? \* = **Bold** Same way markup is done here on the forum. So if you can set the string value first time then this card is not needed. If it’s output like our tag values then this can be handy indeed.

---

<div class="post-metadata">

**Author:** ![JMH](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jmh/32/29230_2.png) [@JMH](https://community.homey.app/u/JMH)\
**Post date:** [October 9, 2023, 8:32pm UTC](https://community.homey.app/t/app-pro-flow-utilities/53027/159 "2023-10-09T20:32:59Z")

</div>

The way I would like to use the card is to replace the same text every time, aswell for markup as for changing text.

For example:  
With the P2000-app I receive a long string, I would like to set the “Prio 1/2/3” to bold text.  
 → AND string contains Prio 1 THEN replace Prio 1 with \< b \>Prio 1\< /b \>

Same app the ambulance were called from Noord Holland instead of Flevoland in my case. I want to change Noord Holland to Flevoland.

With this option I get a quick and better overview in my Telegram.

---

<div class="post-metadata">

**Author:** ![RobbertV](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robbertv/32/37250_2.png) [@RobbertV](https://community.homey.app/u/RobbertV)\
**Post date:** [October 10, 2023, 7:59am UTC](https://community.homey.app/t/app-pro-flow-utilities/53027/160 "2023-10-10T07:59:47Z")

</div>

Hi @JMH,

Thanks for you response and explanation. I will have a look how we can make this in to an action card. I would like to make it more generally usable, so this requires some thinking and playing around.

I will have a look and let you know when I know more 🙂

---

<div class="post-metadata">

**Author:** ![RobbertV](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robbertv/32/37250_2.png) [@RobbertV](https://community.homey.app/u/RobbertV)\
**Post date:** [October 10, 2023, 1:51pm UTC](https://community.homey.app/t/app-pro-flow-utilities/53027/161 "2023-10-10T13:51:17Z")

</div>

Hi @JMH,

I have been tinkering around and I think this should do the trick:

 ![Scherm­afbeelding 2023-10-10 om 15.48.49](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/d/6/d6c018823145e2e23d339f43480882c78dc1e53c.png)

I have pushed this to the test release: [Flow Utilities App for Homey | Homey](https://homey.app/a/com.flow.utilities/test/)

---

<div class="post-metadata">

**Author:** ![RobbertV](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robbertv/32/37250_2.png) [@RobbertV](https://community.homey.app/u/RobbertV)\
**Post date:** [October 10, 2023, 1:52pm UTC](https://community.homey.app/t/app-pro-flow-utilities/53027/162 "2023-10-10T13:52:56Z")

</div>

## App update: (Test: [1.5.0](https://homey.app/a/com.flow.utilities/Test))

> - **New** Action card for text replace function

[Previous page](https://community.homey.app/t/app-pro-flow-utilities/53027.md?page=7)

[Next page](https://community.homey.app/t/app-pro-flow-utilities/53027.md?page=9)
