# \[APP\]\[Pro\] Home Assistant - Community App

**URL:** <https://community.homey.app/t/app-pro-home-assistant-community-app/71477>\
**Category:** Apps\
**Tags:** app, tools, homey-pro, home-assistant\
**Created:** [October 31, 2022, 8:25pm UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477 "2022-10-31T20:25:26Z")\
**Posts on this page:** 20\
**Page:** 47

<div class="post-metadata">

**Author:** ![RonnyW](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ronnyw/32/10879_2.png) [@RonnyW](https://community.homey.app/u/RonnyW)\
**Post date:** [November 29, 2023, 2:43pm UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/929 "2023-11-29T14:43:11Z")

</div>

In your last screenshot you can see that the first capability is added as measure\_power and Jomey rounds in sensor view.  
The last entity is measure\_numeric (assumed based on the icon) and so it’s not rounded.

Can you please check the entity in your HA developer tools:

- some type attribute or a unit set?

Please think about the ukit you wang to have in Homey (W or kW).  
Based on these informations I can guide you…

---

<div class="post-metadata">

**Author:** ![RonnyW](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ronnyw/32/10879_2.png) [@RonnyW](https://community.homey.app/u/RonnyW)\
**Post date:** [November 29, 2023, 2:45pm UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/930 "2023-11-29T14:45:47Z")

</div>

> [@Poverino](#):
>
> On advice, I downloaded the Home Assistant Community App

Hi,  
this app integrated devices of a HomeAssistant smart home system.  
Based on your question I assume you don’t have a HomeAssistant system running, right? So this app makes no sense for you 🤷‍♂️

---

<div class="post-metadata">

**Author:** ![Jan\_Peeters](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jan_peeters/32/86660_2.png) [@Jan\_Peeters](https://community.homey.app/u/Jan_Peeters)\
**Post date:** [November 29, 2023, 3:21pm UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/931 "2023-11-29T15:21:00Z")

</div>

Does this help?

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/5/1/514b53a6f987140a681c2dde1618d28933d9ee8c.png)

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/7/1/71b383e6d6f196b04ad6bfd0d3e2273263ba9190.png)

---

<div class="post-metadata">

**Author:** ![RonnyW](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ronnyw/32/10879_2.png) [@RonnyW](https://community.homey.app/u/RonnyW)\
**Post date:** [November 29, 2023, 3:23pm UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/932 "2023-11-29T15:23:23Z")

</div>

Yes, exactly what I need.  
And now what you want to see in Homey (W or kW - Homey or HA style).

---

<div class="post-metadata">

**Author:** ![Jan\_Peeters](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jan_peeters/32/86660_2.png) [@Jan\_Peeters](https://community.homey.app/u/Jan_Peeters)\
**Post date:** [November 29, 2023, 3:26pm UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/933 "2023-11-29T15:26:30Z")

</div>

Doesn’t really matter, I’am happy with either W or kW. Let’s go for “W”.  
Then it looks as if my solar panels are generating more 😛

And therefor: zero decimals

---

<div class="post-metadata">

**Author:** ![Poverino](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/poverino/32/88020_2.png) [@Poverino](https://community.homey.app/u/Poverino)\
**Post date:** [November 29, 2023, 3:42pm UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/934 "2023-11-29T15:42:25Z")

</div>

I have homey pro running

---

<div class="post-metadata">

**Author:** ![RonnyW](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ronnyw/32/10879_2.png) [@RonnyW](https://community.homey.app/u/RonnyW)\
**Post date:** [November 29, 2023, 4:47pm UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/935 "2023-11-29T16:47:50Z")

</div>

Then you don’t need this app. It’s only used to import devices from HomeAssistant to HomeyPro.

Who has recommended this app?  
Perhaps someone recommended to use HomeAssistant parallel to HomeyPro to add your devices via HomeAssistant. But I don’t think that’s what you want to do (a second smarthome system).

---

<div class="post-metadata">

**Author:** ![Poverino](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/poverino/32/88020_2.png) [@Poverino](https://community.homey.app/u/Poverino)\
**Post date:** [November 29, 2023, 5:05pm UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/936 "2023-11-29T17:05:36Z")

</div>

I have underfloor heating, which has 3 thermostats connected to it. WarmUp 6.i that I would like to connect to my Homey.

---

<div class="post-metadata">

**Author:** ![RonnyW](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ronnyw/32/10879_2.png) [@RonnyW](https://community.homey.app/u/RonnyW)\
**Post date:** [November 29, 2023, 5:11pm UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/937 "2023-11-29T17:11:37Z")

</div>

Sorry, I can’t help and that’s the wrong thread. Please ask in the ‘devices’ section. Perhaps someone knows these device.

You need a Homey app to add the devices, so please seach in the Homey app store.

---

<div class="post-metadata">

**Author:** ![Jan\_Peeters](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jan_peeters/32/86660_2.png) [@Jan\_Peeters](https://community.homey.app/u/Jan_Peeters)\
**Post date:** [November 29, 2023, 5:15pm UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/938 "2023-11-29T17:15:42Z")

</div>

This was your answer, in the exact order:

> [@WarmUp / MyHeating](https://community.homey.app/t/warmup-myheating/94248/4):
>
> [Home Assistant](https://home-assistant.io) installeren, [HACS](https://hacs.xyz/) installeren, de [Warmup integratie](https://github.com/ha-warmup/warmup) installeren, je Warmup apparaten toevoegen aan Home Assistant, de [Home Assistant app voor Homey](https://homey.app/en-nl/app/io.home-assistant.community/Home-Assistant-Community/) installeren, en je apparaten koppelen. man_shrugging:t3

---

<div class="post-metadata">

**Author:** ![RonnyW](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ronnyw/32/10879_2.png) [@RonnyW](https://community.homey.app/u/RonnyW)\
**Post date:** [November 29, 2023, 5:53pm UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/939 "2023-11-29T17:53:02Z")

</div>

Ok, let’s start 🙂

The Homey app searchs a capability based in the device type or unit. kW doesn’t fit to any Homey capability, so measure\_numeric is used (generic number value).

Please do the following steps:

- remove your capability from your device
- add your entity again
- change the capability into “measure\_power” (insert manually or select from the autocomplete list). Use a “main” capability (measure\_power) without a subcapability (added “.xxx”). This way the capability can be used in other apps like PowerByTheHour. But you can have only one capability with this name. To add another one, you have to use subcapabilities or create a second device.
- Set the unit to “W”
- add a converter to calculate the value:  
`(value) => { return Math.round(parseFloat(value) * 1000); }`  
x1000 to get Watt and then round to 0 decimal places

 ![grafik](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/8/c84ea1b9db4e9710c5280880503e6b1a86510c8a.png)

---

<div class="post-metadata">

**Author:** ![Jan\_Peeters](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jan_peeters/32/86660_2.png) [@Jan\_Peeters](https://community.homey.app/u/Jan_Peeters)\
**Post date:** [November 29, 2023, 7:24pm UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/940 "2023-11-29T19:24:11Z")

</div>

Perfect; seems to work flawlessly!! 😍 🤩  
Two questions:

- What would be the correct syntax to multiply AND have three decimals? _(value) =\> { return Math.round(parseFloat(value) \* 1000 . **3** ); }_ doesn’t seem to do the trick
- Where can I start to learn everything there is to learn about these syntaxes? Is this Python, Yaml, Java?

---

<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:** [November 29, 2023, 8:00pm UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/941 "2023-11-29T20:00:05Z")

</div>

Try comma 3, not dot 3  
Like:  
`{ return Math.round(parseFloat(value) * 1000,3); }`

 ![Screenshot_20231129-205816_Chrome](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/5/5/55a459cd08839ba65a52b8134f499fc17b1c69b8.jpeg)

[Mathjs.org](https://mathjs.org/docs/reference/functions/round.html)

---

<div class="post-metadata">

**Author:** ![RonnyW](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ronnyw/32/10879_2.png) [@RonnyW](https://community.homey.app/u/RonnyW)\
**Post date:** [November 29, 2023, 8:01pm UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/942 "2023-11-29T20:01:20Z")

</div>

It’s JavaScript, the same you can use in HomeyScript.

Math.round( ) only rounds to a full number (0 decimals). You have to calc:  
Math.round( value \* 1000) / 1000 to get 3 decimals.

In your example:  
`(value) => { return Math.round(parseFloat(value) *1000 * 1000)/1000; }`

---

<div class="post-metadata">

**Author:** ![Jan\_Peeters](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jan_peeters/32/86660_2.png) [@Jan\_Peeters](https://community.homey.app/u/Jan_Peeters)\
**Post date:** [November 29, 2023, 8:14pm UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/943 "2023-11-29T20:14:28Z")

</div>

> [@RonnyW](#):
>
> JavaScript,

Thank you all!  
I will though have to study hard and long.  
Best result I got was two decimals coming from:

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/7/07747bfaab99869ac5b671eef8024d90adbb3f12.png)

---

<div class="post-metadata">

**Author:** ![RonnyW](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ronnyw/32/10879_2.png) [@RonnyW](https://community.homey.app/u/RonnyW)\
**Post date:** [November 29, 2023, 8:21pm UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/944 "2023-11-29T20:21:01Z")

</div>

If your converter is not working (syntax error etc), you can see a error message in app log (repair view).

The converter is technically a function with one parameter “value”.  
The value is the content of the entity state (if an entity was added) or the attribute value (if an entity attribute was added).  
The real value you can see in HA developer tools. Sometimes the HA dashboard displays a converted value (rounded…).

---

<div class="post-metadata">

**Author:** ![Jan\_Peeters](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jan_peeters/32/86660_2.png) [@Jan\_Peeters](https://community.homey.app/u/Jan_Peeters)\
**Post date:** [November 29, 2023, 9:15pm UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/945 "2023-11-29T21:15:21Z")

</div>

Since none of the above syntaxes are 100% without errors, I begin to suspect that this might be a very high 🏔 mountain 🏔 to climb for someone who considers this just a hobby. 😅

I am beginnig to suspect that I will never win a beauty contest with my wonky integrations 🤪

---

<div class="post-metadata">

**Author:** ![RonnyW](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ronnyw/32/10879_2.png) [@RonnyW](https://community.homey.app/u/RonnyW)\
**Post date:** [November 29, 2023, 9:27pm UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/946 "2023-11-29T21:27:38Z")

</div>

If you need an example for other converters, just ask 😉

---

<div class="post-metadata">

**Author:** ![Gisle\_Johnsen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gisle_johnsen/32/9720_2.png) [@Gisle\_Johnsen](https://community.homey.app/u/Gisle_Johnsen)\
**Post date:** [November 29, 2023, 11:29pm UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/947 "2023-11-29T23:29:17Z")

</div>

I see… Then it makes sence… 😃

---

<div class="post-metadata">

**Author:** ![RonnyW](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ronnyw/32/10879_2.png) [@RonnyW](https://community.homey.app/u/RonnyW)\
**Post date:** [November 30, 2023, 7:12am UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/948 "2023-11-30T07:12:17Z")

</div>

Thanks, I wasn’t sure if it already works on Homey based on the NodeJS version.

[Previous page](https://community.homey.app/t/app-pro-home-assistant-community-app/71477.md?page=46)

[Next page](https://community.homey.app/t/app-pro-home-assistant-community-app/71477.md?page=48)
