Add label to states options

Hi, I just started with HA (running supervised) and struggling with the following :
I would like to add label to states options on a device (created via Tuya).
The lovelace and the states are as follow :

I would like to have label replacing the 0, 1, 2, 3

Not looking for a solution just in hand, but if anyone could lead me in some direction that would be much appreaciated.

Thanks !

You can’t easily alter the entity created by an integration, but you can create a Template select entity that can act as a proxy so that you can use whatever option names you prefer.

There is an example here:

1 Like

Thank you for pointing to the right solution, it’s working as intended.
If someone is looking to do the same, I’ve added the following code to configuration.yaml :

  - select:
      - name: "Whisper Fan Vertical Swing Remapped"
        unique_id: whisper_flex_ultimate_vertical_swing_flap_angle_remapped
        state: >
          {% set opt = states('select.whisper_flex_ultimate_vertical_swing_flap_angle') %}
          {% set mapper = {
            '0': 'Off',
            '1': '95°',
            '2': '105°',
          }%}
          {{ mapper.get(opt) }}
        options: "{{['Off','95°','105°']}}"
        select_option:
          - service: select.select_option
            data:
              option: >
                {% set mapper = {
                  'Off': '0',
                  '95°': '1',
                  '105°': '2',
                }%}
                {{ mapper.get(option) }}
            target:
              entity_id: select.whisper_flex_ultimate_vertical_swing_flap_angle
        availability: "{{ state_attr('select.whisper_flex_ultimate_vertical_swing_flap_angle', 'options') is defined }}"

Resulting in this :
image