# Changing enum values in custom picker capability

**URL:** <https://community.homey.app/t/changing-enum-values-in-custom-picker-capability/52479>\
**Category:** Developers\
**Created:** [October 1, 2021, 9:39am UTC](https://community.homey.app/t/changing-enum-values-in-custom-picker-capability/52479 "2021-10-01T09:39:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Swesen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/swesen/32/34485_2.png) [@Swesen](https://community.homey.app/u/Swesen)\
**Post date:** [October 1, 2021, 9:39am UTC](https://community.homey.app/t/changing-enum-values-in-custom-picker-capability/52479/1 "2021-10-01T09:39:29Z")

</div>

Hi,  
I would like to change or set the values in an enum custom capability that uses the picker ui.

```auto
{
    "type": "enum",
    "title": {
        "en": "Assigned current",
        "sv": "Tilldelad ström"
    },
    "values": [
        {
            "id": "off",
            "title": {
                "en": "Off",
                "sv": "Av"
            }
        },
        {
            "id": "1",
            "title": {
                "en": "1 A"
            }
        },
        ...
        {
            "id": "16",
            "title": {
                "en": "16 A"
            }
        }
    ],
    "getable": true,
    "setable": true,
    "uiComponent": "picker"
}

```

This capability is super simple and rather than having multiple ones where the only difference is the values. During pairing I would like to get the range of values from the device, and populate the values in the capability since there are different ranges depending on the predefined settings in the device.

Name and number of ports are fetched during pairing via MQTT so I would like to do the same with this but can’t seem to change the enum values in any way.

In `onAdded()` I have tried `this.setCapabilityOptions('assign_current', { values });` but “values” in capability options is just ignored.
