DropDown with friendly name

Hi,

I do have the following setup. I have FHEM running which is getting details from my pool. These settings are getting published to HA via MQTT.
One parameter is the mode of operations (manual, auto, heating) - it is a nummeric value (0,1,2).
Now my idea is to create some drop down in HA and based on the selection FHEM will be triggered to set the selected mode.
The automation part is clear so far but I am struggling a bit with the drop down.
The command to trigger the mode change will look like that:

set_poolmodus: "curl 192.168.1.34:8083/fhem?cmd=set%20Pool.Hidrolife.FiltrationsModus%20{{ states('input_select.pool_modus_select') }}

As long as I would just go with the nummeric value everything should be easy.
But I would like to have a dropdown which is showing the description (Auto, Manual, Heating) and internally is using the ID of it. In the dropdown helper I can just enter one value either the nummeric or the description.

Is there any best practice to solve that or any example?

br.
F.

Have you looked at this?

I haven’t tried itmyself, it seems to include dropdowns.

Seem that it will do the job. Got the friendly name in:

type: dropdown
entity_id: input_select.pool_modus_select
options:
  - entity_id: input_select.pool_modus_select
    option: 0 - Manuell
    tap_action:
      action: perform-action
      perform_action: input_select.select_option
      data:
        option: '0'
      target:
        entity_id: input_select.pool_modus_select
    value_attribute: friendly_name
    haptics: false
  - entity_id: input_select.pool_modus_select
    option: 1 - Auto
    tap_action:
      action: perform-action
      perform_action: input_select.select_option
      data:
        option: '1'
      target:
        entity_id: input_select.pool_modus_select
    value_attribute: friendly_name
  - entity_id: input_select.pool_modus_select
    option: 2 - Heizen
    tap_action:
      action: perform-action
      perform_action: input_select.select_option
      data:
        option: '2'
      target:
        entity_id: input_select.pool_modus_select
    value_attribute: friendly_name

Only issue is that that the current selected item is not shown in the dropdown. Please see pictures.


As you can see the current value is set to “2” so the dropdown should also show the last entry.

If that is working I would like to hide the value below the Entity Name - how?

Does anybody have any idea?

Still looking for an answer. Overall everything so far is working. Only the right drop down element should be displayed as selected based on the entity value on page opening/refresh. Right now it it is always blank.

          - entity_id: input_select.pool_modus_select
            option: "2"
            label: 2 - Heizen
            tap_action:
              action: perform-action
              perform_action: input_select.select_option
              data:
                option: "2"
              target:
                entity_id: input_select.pool_modus_select
            value_attribute: friendly_name

The option value had to be the same. For the friendly name the label had to be used. Now it is working as expected.