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

<div class="post-metadata">

**Author:** ![JOR1](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jor1/32/17206_2.png) [@JOR1](https://community.homey.app/u/JOR1)\
**Post date:** [April 15, 2023, 6:39pm UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/467 "2023-04-15T18:39:25Z")

</div>

Thanks for answearing.

---

<div class="post-metadata">

**Author:** ![Sharkys](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sharkys/32/54029_2.png) [@Sharkys](https://community.homey.app/u/Sharkys)\
**Post date:** [April 18, 2023, 8:37pm UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/468 "2023-04-18T20:37:54Z")

</div>

@RonnyW , may I ask you, is there some way how to add directly such “listbox” from HA ?

![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/e/4/e4636c0ea3f745fbd4e597ab95a9041dbd3a1610.png)

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:** [April 18, 2023, 8:49pm UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/469 "2023-04-18T20:49:54Z")

</div>

Not in the GUI (App, WebApp) with dynamic content. Mode capabiities must be defined in the app with fixed entries. That’s why mist GUI selectors have standard HA values. If an integration uses custom values instead, you can’t use them in the app  
Only possible way tonuse dynamic lists is as autocomplete field in flow cards - like already implemented for modes (vacuum, climate …).

---

<div class="post-metadata">

**Author:** ![Sharkys](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sharkys/32/54029_2.png) [@Sharkys](https://community.homey.app/u/Sharkys)\
**Post date:** [April 18, 2023, 9:04pm UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/470 "2023-04-18T21:04:26Z")

</div>

Hmm, thank you, not sure I understand but they are not dynamic.

I was hoping it’s possible like this …

 ![SmartSelect_20230418_230224_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/0/0057e440c7bc6390c5c7b567e5233e3973678d4f.jpeg)

Nevermind, thank you for answer! 👍

---

<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:** [April 18, 2023, 9:10pm UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/471 "2023-04-18T21:10:35Z")

</div>

Fan speed as list is deprecated. Percentage should be used instead (using the slider).

> **[Fan](https://www.home-assistant.io/integrations/fan/)**
>
> Instructions on how to setup Fan devices within Home Assistant.

> **[Fan Entity | Home Assistant Developer Docs](https://developers.home-assistant.io/docs/core/entity/fan/)**
>
> A fan entity is a device that controls the different vectors of your fan such as speed, direction and oscillation. Derive entity platforms from 'homeassistant.components.fan.FanEntity'.

If there are mode lists in the app, then I took standard values from the HA classes to allow usage of standard lists in the GUI. In flows, the entity dependent list should be useable in autocomplete fields.

---

<div class="post-metadata">

**Author:** ![Sharkys](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sharkys/32/54029_2.png) [@Sharkys](https://community.homey.app/u/Sharkys)\
**Post date:** [April 19, 2023, 4:42am UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/472 "2023-04-19T04:42:27Z")

</div>

Thanks. I used FAN only as example how it can be implemented on Homey side, in HA it’s above (water heater modes - Antifreeze, Smart, Prog and Manual), which you said it’s Dynamic content and can’t be implemented. I just wasn’t sure if you understand, what I mean.

---

<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:** [April 19, 2023, 6:11am UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/473 "2023-04-19T06:11:32Z")

</div>

There is no generic systematic. It depends on HA entities, domains ans integrations.  
But yes, that’s the same for water heater.

> **[Water Heater Entity | Home Assistant Developer Docs](https://developers.home-assistant.io/docs/core/entity/water-heater/)**
>
> Derive entity platforms from homeassistant.components.waterheater.WaterHeaterEntity

The entity has a list of possible operations you can select one. This list can be different for different water heaters, but also it can be dependent on the mode.  
Such mode lists can only be set in flow cards.

---

<div class="post-metadata">

**Author:** ![Sharkys](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sharkys/32/54029_2.png) [@Sharkys](https://community.homey.app/u/Sharkys)\
**Post date:** [April 19, 2023, 6:30am UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/474 "2023-04-19T06:30:27Z")

</div>

> [@RonnyW](#):
>
> Such mode lists can only be set in flow cards.

If that could be set via flow, it’s OKay - I was assuming it’s no possible. Here I was rather speaking about “visualisation”. Thank you anyway for follow-ups, I really appreciate !

**update** you mean  
 ![obrazek](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/7/f/7f7cc368fc2c1c1234f27d2ad19bf4d716f85452.png) - can I do anything if the “Present modes” are not populated from HA ? In HA it’s entity called “select.water\_heater\_mode”

---

<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:** [April 19, 2023, 7:31am UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/475 "2023-04-19T07:31:41Z")

</div>

Yeah, that’s a good example of a bad implementation 😁  
The select entity is a standalone helper entity. The heater has surely added his own automation to listen on changes (like you would do in Homeynwith virtual devices and flows).  
It’s not part of the heater itself.

A workaround would be to use the generic app flow actions to call a HA service. With the entity ID and a service name for select domains it should be possible to change the preset mode via flows.

---

<div class="post-metadata">

**Author:** ![Sharkys](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sharkys/32/54029_2.png) [@Sharkys](https://community.homey.app/u/Sharkys)\
**Post date:** [April 19, 2023, 2:03pm UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/476 "2023-04-19T14:03:06Z")

</div>

> [@RonnyW](#):
>
> Yeah, that’s a good example of a bad implementation

ESPHome…

> [@RonnyW](#):
>
> A workaround would be to use the generic app flow actions to call a HA service. With the entity ID and a service name for select domains it should be possible to change the preset mode via flows.

You mean this, right ?  
 ![obrazek](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/7/6/76dce1c7835a9ded03c4ccac335b00f24e308736.png)

Thank you…will try to play with that.

---

<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:** [April 19, 2023, 4:08pm UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/477 "2023-04-19T16:08:32Z")

</div>

> [@Sharkys](#):
>
> You mean this, right ?

Yes, that’s the right card.  
You already selected your entity.  
You will need one if these services. The data part shown kn the Yaml is needed as data JSON in the card.

> **[Select](https://www.home-assistant.io/integrations/select/)**
>
> Instructions on how to manage your Select entities with Home Assistant.

Perhaps you need to check the IDs of your select list in HA developer tools.

---

<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 22, 2023, 5:26pm UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/478 "2023-04-22T17:26:09Z")

</div>

Hi all,

I’m not able to realize two compound media\_player attribute conversions 🤨 🙈  
I’d like to trim a string, returning the first 7 characters  
I’d like to convert a timestamp to a human readable time & date.

(And a future wish, to be able to load the `entity_picture` which is an external URL in the Homey compound device (class=speaker).  
As there is no default capability for images, I don’t know how  
Is it even possible atm?)

This is the attribute list:

 ![Screenshot from 2023-04-22 19-13-30](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/a/0af66f716670dea419f4212a3de6594438dcd37b.png)

##### I’ve tried many, many things, but it doesn’t work:

```auto
  capabilitiesConverters:
    measure_generic.media_position_updated_at:
      from: (state) => { return as_timestamp(state) | timestamp_custom('%-H:%M %d-%m-%Y'); }
      to: (value) => { return value; }
    measure_generic.media_position_updated_at.2:
      from: (state) => { return (state.last_changed); }
      to: (value) => { return value; }
    measure_generic.media_content_id:
     from: (state) => { return (state[0:7]); } # should return the 1st 7 chars
     to: (value) => { return value; } 

```

##### I used this as a start from a working conversion

```auto
# capabilitiesConverters:
# measure_power:
# from: (state) => { return parseFloat(state) * 0.001; }
# to: (value) => { return value / 1000; }

```

---

<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:** [April 22, 2023, 9:41pm UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/479 "2023-04-22T21:41:20Z")

</div>

Hi Peter,

with your first 2 questions I can help after my holidays.  
You have to deal with find method to find a string or extract the substring if it’s every time the same üositio. with subtring function.  
It’s easier to try this if you don’t use compound device but use the add entity / change entity function instead. This will update the device directly after hitting the change button without HA restart.

Your 3th question:  
What device should show the image? The media device is using local or remote url to show the image. But if there is another integration that’s not using HAs default attributes it’s possible that’s nor working.

---

<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 23, 2023, 12:28am UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/480 "2023-04-23T00:28:48Z")

</div>

Hi Ronny,

No rush,  
I tried the add/change entity of course, but it doesn’t list any ‘media\_player’ capabilities. Also looking for ‘heos’ doesn’t return results.  
 ![Screenshot from 2023-04-23 01-21-02](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/4/3/43318bc0571418542fbc2a36a01f9e8107be1f4e.png)

So I went to use the compound for this.  
Background,  
I like to enable a second receiver only when Spotify is playing.  
The heos mediaplayer integration is the only device which shows Sfy in text and as a numeric code, which I can use in AND flow cards. (The Homey apps Marantz/Sfy don’t have that value available).

Well, that works now, but I got carried away about “just” adjusting the string and the timestamp.  
For the timestamp I used a template sensor in the end, but that also doesn’t work yet.

While the album art is available as external link, I thought, when I set the device class to ‘Speaker’ I maybe can show the art in the device as well.  
But that might be not as simple and for me no need to spend time on.

---

<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:** [April 23, 2023, 6:54am UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/481 "2023-04-23T06:54:29Z")

</div>

Ah, yes. As custom entities only simple domains are supported (sensor, button, switch). And only state and no attribute. So you are right with compound.  
I just think about making it possible to insert any entity with attributes (without autocomplete hint - that will make the list too long) and reading its value like it’s done in compound, and write it into a target capability.  
So you would have to set attribut and capability by yourself but can use the adhoc update for converters.

And you can’t set an album art only with a capability. You have to do it with SDK functions inside the device.  
I could add an flow card to set an external url as album art source for you main media player to show the image from the second one. But then you still need a dummy compound device to have a capability with the url.

---

<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 23, 2023, 12:12pm UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/482 "2023-04-23T12:12:55Z")

</div>

Thx for looking into it, Ronny.  
I just read about a sensor template for attributes, that makes life (and converting values) easier.

So, now these values are ‘humanized’

- `media_content_id: spotify:track:3xmi6xxxxxxxxxxxxxxx`
- `media_position_updated_at: 2023-04-23T11:50:04.814895+00:00`

to these values

 ![Screenshot from 2023-04-23 13-25-00](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/a/3/a3abbef5c79cdf20b1f60102f45ee999ec8ef84e.png)

> **yaml**
>
> ```auto
> sensor:
> - platform: template
> sensors:
> # Used for converting some Marantz Heos values
> heos_media_play_position_update_timestamp:
> friendly_name: "HEOS media position update timestamp"
> value_template: >
> {{ as_timestamp(state_attr('media_player.marantz_sr5012_heos', 
> 'media_position_updated_at')) 
> | timestamp_custom('%-H:%M:%S %d-%m-%Y') }}
> 
> heos_content_id_stripped_for_spotify:
> friendly_name: "HEOS ContentID stripped for Spotify"
> value_template: >
> {{ state_attr('media_player.marantz_sr5012_heos', 
> 'media_content_id')[0:7] }}
> 
> ```

The album art is nice to have, but too messy imho, so for me, you may forget about it 🙃

---

<div class="post-metadata">

**Author:** ![Sharkys](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sharkys/32/54029_2.png) [@Sharkys](https://community.homey.app/u/Sharkys)\
**Post date:** [April 23, 2023, 1:14pm UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/483 "2023-04-23T13:14:02Z")

</div>

Thank you Ronny. I’m quite new with HA so I’m not 100% sure what do you mean but trying to understand… seems that this is the entity details I need

![obrazek](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/9/e/9ec8d73693b5e014dfb02ed4cd177f283775d562.png)

 ![obrazek](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/5/0/50d5a6152e8d86c70c41b71bd53901461eff71b7.png)

…but trying to set it in any form, fails…

![obrazek](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/8/b/8b4ce9d5b7e50a78ce402fb60d3896310fc68c35.png)

I ave tried different DATA options - {“options”: “MANUAL”} , “MANUAL”, MANUAL etc. but nothing works. … what do it miss ?

---

<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 23, 2023, 7:40pm UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/484 "2023-04-23T19:40:03Z")

</div>

I was testing a bit, and had similar error msgs. You were so close though 😉

This is my test device, a thermostat.  
I tried the data part of the flow card with `{"hvac_modes":"off"}` but it results in those errors ‘_extra keys not allowed @ …_’

 ![Screenshot from 2023-04-23 21-42-35](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/8/7/878829764e41def0691e59e2ef69891329ca1c42.png)

![Screenshot from 2023-04-23 21-43-27](https://us1.discourse-cdn.com/flex025/uploads/athom/optimized/3X/1/f/1f35fa5a8a8df5267efddff742390011ac3dd72f_2_690x59.png)

##### What was the issue in my case:

To check things, I made an automation action card for climate.set\_hvac\_mode and viewed the YAML afterwards:

 ![Screenshot from 2023-04-23 21-24-21](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/d/0db026d6f222b738a3204a83e67a6b981735631a.png)

Yup, `hvac_mode` is written without the trailing ‘ **s** ’ 😵‍💫

 ![Screenshot from 2023-04-23 21-33-23](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/7/9/79acfe46dc59595b7d735a7f5ebe5ddf6da4d7f1.png)

##### I’d love to hear if it works for you with `{"option":"MANUAL"}`

---

<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:** [April 23, 2023, 8:38pm UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/485 "2023-04-23T20:38:58Z")

</div>

@Peter_Kawa @Sharkys  
Sorry for late answer. Peters answer should be the solution.

options = list of possible options.  
option or state (depents whether it’s the entities state or an attribute) = selected option.

Like in linked service description for the select entity.

 ![Screenshot_20230423_212745_Firefox](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/6/0/60d8c9ccefc89be8f19ffc4a3aa184fea19bfbe4.jpeg)

But @Sharkys, you inserted the entity (select.water\_heater\_mode) and the data (should be “option”), but your service is wrong. It must be the service from the “select” domain “select.select\_option” (see screenshot).

---

<div class="post-metadata">

**Author:** ![Sharkys](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sharkys/32/54029_2.png) [@Sharkys](https://community.homey.app/u/Sharkys)\
**Post date:** [April 23, 2023, 9:19pm UTC](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/486 "2023-04-23T21:19:38Z")

</div>

@RonnyW thanks for pointing me to the “service”, now I actually understand what “service” in HA is 😉  
@Peter_Kawa , “s” ! like in your case but for option 😆 (and yes, the HA automation while checking created YAML helps!) :

![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/4/7/47aeddd7845271596d8e624bac47dd2cc765d7bf.png)

> [@Peter\_Kawa](#):
>
> I’d love to hear if it works for you with `{"option":"MANUAL"}`

![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/4/7/4703bf2edbf91fefd9517864b5c116ee0fd443d2.png)

Yes, it does (also tested in HA naturally and it reflects the state correctly.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/2/a/2a28b3b125d02f3f4e11b9d7a0fa46870c3ee8e3.png)

Thank you @Peter_Kawa for help and naturally @RonnyW for help and for creating such nice app !

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

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