# \[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:** 8

<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 27, 2022, 11:45am UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/142 "2022-11-27T11:45:38Z")

</div>

The compound can’t be used to control lights. Lights are more complex with several attribibutes/capabilities and services.  
So you could add switch entity but no light dim/color.  
The dim capability is used to add a slider to change input\_number entities (and its state). It can’t be used for light dim as this would need special entity dependent logic.

If you are able to rename your power to the light name with suffix \_power, then this sensor will be added automatically. See this post:

> [@\[APP\]\[Pro\] Home Assistant - Community App](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/95):
>
> A new test version 0.3.0 is online with the following changes: Presence device added You can add your device\_tracker or person entitiey as presence device. It has a state (home / not\_home like in HA) and a presence alarm. The alarm can be inverted in device settings. [grafik] Added power sensor for lights When using the [PowerCalc](https://community.home-assistant.io/t/powercalc-virtual-power-sensors/318515) integration, you will get corresponding power sensors for your light: Light: light.mylight Sensor: sensor.mylight\_power If that sensor is found, it’s added …

Another way is not possible yet.  
If that’s not possible, you can only add your power sensors into one compound and keep lights separated. So you would have a power meter device for all lights. It’s not the same but perhaps a workaround.

---

<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 27, 2022, 11:46am UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/143 "2022-11-27T11:46:34Z")

</div>

This should be possible with capabilitiesConverters. I can provide an example later.

---

<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 27, 2022, 12:02pm UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/144 "2022-11-27T12:02:19Z")

</div>

While thinking about a solution I got the idea of adding a device setting field for lights to set a power sensor entity name manually and this will be used instead of the default \_power sensor.  
I will check this and add it in the next version if possible. I’give you a a feedback…

---

<div class="post-metadata">

**Author:** ![GRat](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/grat/32/17928_2.png) [@GRat](https://community.homey.app/u/GRat)\
**Post date:** [November 27, 2022, 12:55pm UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/145 "2022-11-27T12:55:07Z")

</div>

Thanks - I will try the \_power and see if that works as well.  
UPDATE: yes worked with changing to \_power. thx!

---

<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 27, 2022, 9:17pm UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/146 "2022-11-27T21:17:47Z")

</div>

> [@Andi](#):
>
> is there a possibility to “round” values to 2 decimals (AUSGABEN & EINNAHMEN)?

Hi,  
the current app version only uses capabilityConverters for a apabilities, not for subcapabilities. I will add support for subcapabilities in the next version.

For now you can add:

```yaml
  capabilitiesConverters:
    measure_numeric: 
      from: (state) => { return Math.round(state*100) / 100; }

```

This rounds on 2 decimal places (1st x100, then round on full integer, then /100 for 2 decimals).  
The capabilityConverter uses a JavaScript function to convert the capability value “state”.  
The conversion will be processed for all measure\_numeric capabilities (so for all your entities).  
The next app version will provide the possibility to add a converter for only a specific entry (e.g. measure\_numeric.consumption\_cost).

---

<div class="post-metadata">

**Author:** ![Andi](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/andi/32/160466_2.png) [@Andi](https://community.homey.app/u/Andi)\
**Post date:** [November 27, 2022, 10:18pm UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/147 "2022-11-27T22:18:02Z")

</div>

Hi Ronny - Thanks for your help - I tried to change the configuration as suggested (with 3 decimals/1000) but it does not seem to work:

 ![Screenshot 2022-11-27 230737](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/e/b/eb547ee2a541f99accc988f1f84f71756f3b88f8.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 27, 2022, 10:19pm UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/148 "2022-11-27T22:19:53Z")

</div>

Oh, I forgot… The compound definition is stored in the Homey device. You need to remove and re-add the device to Homey to take effect.

---

<div class="post-metadata">

**Author:** ![Andi](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/andi/32/160466_2.png) [@Andi](https://community.homey.app/u/Andi)\
**Post date:** [November 27, 2022, 10:28pm UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/149 "2022-11-27T22:28:03Z")

</div>

> [@RonnyW](#):
>
> ```auto
> capabilitiesConverters:
> measure_numeric: 
> from: (state) => { return Math.round(state*100) / 100; }
> 
> ```

Great! Now it works - THANK 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 28, 2022, 5:58am UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/150 "2022-11-28T05:58:52Z")

</div>

New **test version 0.5.2** :

- For **lights** it’s now possible to use the **duration setting in flow cards** :  
Add the duration in AdvancedFlow via context menu:  
 ![grafik](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/3/0320109b0ddd884771549640fe416dba8c1cd58e.png) ![grafik](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/f/ffce1d455e2c71c716abc1448aff8bc40def2263.png)  
Some light doesn’t seem to support a duration on turning off. If that doesn’t work with your light, use “dim to 0%” with duration. This should dim and the 0% dim value should turn off the light at the end.

- Customizeable power entity for lights.  
You can set now your own power entity providing the energy usage for the light in device settings.  
 ![grafik](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/b/3b46b4861b681bb7e8881eed5fb2bf9c3dc14cee.png)

- Compound device:  
capabilityConverters have been possible only for capability yet. Now you can use them for subcapabilities, too.

CapabilityConverter example:

Example for capability level. This will use the converter for all measure\_numeric capabilities of this compound. This example rounds the value from HA to 2 decimals.

```auto
yamaha:
  name: Yamaha Receiver
  capabilities:
    measure_numeric.vol: media_player.yamaha_receiver.volume_level
  capabilitiesTitles:
    measure_numeric.vol: Volume
  capabilitiesConverters:
    measure_numeric: 
      from: (state) => { return Math.round(state*100) / 100; }

```

Example for subcapability level. This will use the converter only for the set capability.

```auto
yamaha:
  name: Yamaha Receiver
  capabilities:
    measure_numeric.vol: media_player.yamaha_receiver.volume_level
  capabilitiesTitles:
    measure_numeric.vol: Volume
  capabilitiesConverters:
    measure_numeric.vol: 
      from: (state) => { return Math.round(state*100) / 100; }

```

---

<div class="post-metadata">

**Author:** ![Exile82](https://avatars.discourse-cdn.com/v4/letter/e/8491ac/32.png) [@Exile82](https://community.homey.app/u/Exile82)\
**Post date:** [November 28, 2022, 6:53am UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/151 "2022-11-28T06:53:55Z")

</div>

Just had another go with this app. Had some issues in the beginning but know it works like charm! THANKS!

---

<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 28, 2022, 8:27pm UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/152 "2022-11-28T20:27:38Z")

</div>

An example for compoundConversion to convert a UTC/ISO date to your locale version:

I use the current date/time entity from HA as example:

![grafik](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/4/3/43af70c4025b334978c97e5669cf8571471dc287.png)

And I try to get this localized version:

![grafik](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/9/b/9b92fa8101dc13835068b52df16f1dac2cbf798b.png)

Add your datetime entity and the conversion function.  
Exchange the locale (de-DE) and the timezone (Europe/Berlin) with your values.  
Keep the quotation marks - outside `" "` and inside `' '`

```auto
datetime:
  name: DateTime
  capabilities:
    measure_generic: sensor.date_time_iso
  capabilitiesConverters:
    measure_generic: 
      from: "(state) => { return new Date(state).toLocaleString('de-DE', {hour12s: false, timeZone: 'Europe/Berlin', hour: '2-digit', minute: '2-digit', day: '2-digit', month: '2-digit', year: 'numeric' }); }"

```

If your time entity has already the local time without timezone, you can use this converter without the zone:

```auto
  capabilitiesConverters:
    measure_generic: 
      from: "(state) => { return new Date(state).toLocaleString('de-DE', {hour12s: false, hour: '2-digit', minute: '2-digit', day: '2-digit', month: '2-digit', year: 'numeric' }); }"

```

You can also adjust the parameter of the `toLocaleString()` function.  
Reference: [JavaScript Date toLocaleString() Method](https://www.w3schools.com/jsref/jsref_tolocalestring.asp)

---

<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 28, 2022, 9:09pm UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/153 "2022-11-28T21:09:07Z")

</div>

I recognized that some light flow cards are not working after changing the duration logic.  
An update is in progress 🙂

Update: **Test version 0.5.3** is online. Light flows should work now again. If now, please give me a feedback. Thanks.

---

<div class="post-metadata">

**Author:** ![jevvol](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jevvol/32/34198_2.png) [@jevvol](https://community.homey.app/u/jevvol)\
**Post date:** [November 29, 2022, 9:41am UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/154 "2022-11-29T09:41:44Z")

</div>

Nice work. For me work nicely

---

<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:** [December 1, 2022, 8:18am UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/155 "2022-12-01T08:18:53Z")

</div>

New **test version 0.5.4** :

- Added **app log to device repair view**.  
You will need this only in rare cases. But it could be helpful to see the log if you added a faulty compound conversion that won’t work as expected. In this case the log can show you the faulty part.  
 ![grafik](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/a/4/a4465765048abd3871f14ce93f38a28c6bc54648.png)  
 ![grafik](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/7/c/7ce29c32d24ce1379ae52579e2e8ce8c9e459402.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:** [December 3, 2022, 7:21pm UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/156 "2022-12-03T19:21:29Z")

</div>

Is there anyone here who would like to test the vacuum cleaner device?  
Either via Github/CLI or as a test version via the store.  
I tried to add the cleaner to the app but can’t test it myself.

And don’t expect too much from the vaccum device. The HA entity only has a state and some services.

---

<div class="post-metadata">

**Author:** ![Marcel\_Visser](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marcel_visser/32/66024_2.png) [@Marcel\_Visser](https://community.homey.app/u/Marcel_Visser)\
**Post date:** [December 3, 2022, 7:41pm UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/157 "2022-12-03T19:41:27Z")

</div>

YEAH! Count me in! 😃😃 I have 2 Xiaomi Roborock S50 devices to test with.

---

<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:** [December 3, 2022, 10:22pm UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/158 "2022-12-03T22:22:27Z")

</div>

Ecovacs Deebot Slim2:  
Works with start / stop (and it returns to base)!  
It’s the only function of the HA integration 🤗 so this is it 😉

---

<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:** [December 5, 2022, 5:01pm UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/159 "2022-12-05T17:01:34Z")

</div>

What lasts long will be good: **Test version 0.5.15**  
**Vacuum device** should be ready now.  
 ![grafik](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/a/e/ae4393967812b1177793a1c9d0987e1945b79dfc.png)

It has only a state (readonly) and some buttons / flow actions for commands. Please try and report if there are still issues.

---

<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:** [December 7, 2022, 2:53pm UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/160 "2022-12-07T14:53:34Z")

</div>

New **test version 0.5.17** :  
The vacuum state is changed from picker to sensor. It was not possible to hide the error message on attemps to change the state using the picker. So it’s a sensor now showing the (translated) state defined by HA.  
For devices using an own state list I added a raw state sensor showing the original state delivered by HA.  
In addition there is a error message sensor showing a message in case of state=error.

The device tile will switch like a light tile between on and off depending on the device state (if the HA entitiy supports ON/OFF feature).

---

<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:** [December 7, 2022, 7:44pm UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/161 "2022-12-07T19:44:47Z")

</div>

Thanks again Ronny! Working like a charm now.

Marcel, how’s things going with the RoboBobs?

 ![GridArt_20221207_204943201](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/6/f/6f3d445e78d93c3fe0eb9222731e13d2a43306c1.jpeg)

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

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