# Text expression of enum capabilities?

**URL:** <https://community.homey.app/t/text-expression-of-enum-capabilities/49128>\
**Category:** Developers\
**Created:** [July 5, 2021, 4:19pm UTC](https://community.homey.app/t/text-expression-of-enum-capabilities/49128 "2021-07-05T16:19:47Z")\
**Posts on this page:** 4\
**Page:** 1

<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:** [July 5, 2021, 4:19pm UTC](https://community.homey.app/t/text-expression-of-enum-capabilities/49128/1 "2021-07-05T16:19:47Z")

</div>

Is there a way to read the text expresion of a enum capability?  
I have an enum capability to show the device state in the sensor view.  
I would like to add an invisible capability for export via MQTT which should contain the text.

As I’ve seen the capability only offers the value (the enum value).  
Can I read the value using the I18N functionality? I only found the \_\_ method for default I18N text from the /locales/de.json, but not from the capability definition.

> **[ManagerI18n - Homey Apps SDK v3](https://apps-sdk-v3.developer.homey.app/ManagerI18n.html)**

Is there a way to get the capability text or is it necessary to define a corresponding text in /locales/?

---

<div class="post-metadata">

**Author:** ![frodeheg](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/frodeheg/32/49010_2.png) [@frodeheg](https://community.homey.app/u/frodeheg)\
**Post date:** [September 22, 2022, 10:10am UTC](https://community.homey.app/t/text-expression-of-enum-capabilities/49128/2 "2022-09-22T10:10:12Z")

</div>

You can find it it this.manifest.flow.actions[yourActionId].args[yourArgumentId].values

---

<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:** [September 22, 2022, 12:57pm UTC](https://community.homey.app/t/text-expression-of-enum-capabilities/49128/3 "2022-09-22T12:57:26Z")

</div>

Hi, a bit late 🙂  
Got this hint on Slack (from you?) a long time ago. As I remember right, I filter the capability enum list for the key and the title by Homey language. Works fine.

---

<div class="post-metadata">

**Author:** ![frodeheg](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/frodeheg/32/49010_2.png) [@frodeheg](https://community.homey.app/u/frodeheg)\
**Post date:** [September 22, 2022, 2:33pm UTC](https://community.homey.app/t/text-expression-of-enum-capabilities/49128/4 "2022-09-22T14:33:58Z")

</div>

> [@RonnyW](#):
>
> Got this hint on Slack (from you?) a long time ago. As I remember right, I filter the capability enum list for the key and the title by Homey language. Works fine.

Hehe, I know, I just searched for something else and this long unanswered question popped up. I figured it was better to have an answer here in case someone else was searching for it later 🙂  
(and no, it was someone else, I did not even have a homey that long ago 😂 )
