Input_select with value and label?

Hello I command my Heaters mode with an Input_select like this
Capture%20du%202018-05-12%2023-26-41

when the select is changed, an automation trigger a shell command wich send a radio command to the heater.
This radio order is litterally, the R12 or R11 or R10, which is decoded by the receiver.
I would like to have some labels insted of R10… how can I still pass R10, R11 or R12 to the shell but have some frindly user labels in my input_select?

here is my conf:

input_select:
  radia_cuisine:
    name: Radiateur cuisine
    options:
      - "R12"
      - "R11"
      - "R10"
    icon: mdi:target

shell_command:
  set_radia_cuisine: '/usr/bin/python3 /home/homeassistant/testSerial.py {{ states.input_select.radia_cuisine.state }}'

#automation
- alias: Set Thermostat Mode
  trigger:
        platform: state
        entity_id: input_select.radia_cuisine
  action:
    service: shell_command.set_radia_cuisine
input_select:
  radia_cuisine:
    name: Radiateur cuisine
    options:
      - Hot like lava
      - Warm like toast 
      - Cold like ex wife
    icon: mdi:target

shell_command:
  set_radia_cuisine: /usr/bin/python3 /home/homeassistant/testSerial.py "{{ command  }}" 

#automation
- alias: Set Thermostat Mode
  trigger:
    platform: state
    entity_id: input_select.radia_cuisine
  action:
    service: shell_command.set_radia_cuisine
    data_template:
      command: >
        {% if is_state('input_select.radia_cuisine' , 'Hot like lava') %} R12
        {% elif is_state('input_select.radia_cuisine' , 'Warm like toast') %} R11
        {% elif is_state('input_select.radia_cuisine' , 'Cold like ex wife') %} R10
        {% else %} R00 {% endif %} 
      
5 Likes

Thx it works !

1 Like

Hi there,

I did something along these lines. Have a look here:

Hello @pkozul ,

Files lookes like no more available:
https://raw.githubusercontent.com/pkozul/ha-input-select/master/custom_components/input_select.py https://raw.githubusercontent.com/pkozul/ha-input-select/master/packages/radio.yaml
Have you hot new linke or a better solution?