bodtx
(al)
May 12, 2018, 9:31pm
1
Hello I command my Heaters mode with an Input_select like this
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
pkozul
(Petar Kozul)
December 14, 2018, 6:54am
4
Hi there,
I did something along these lines. Have a look here:
Domilo
(Dominique MILLOT)
February 26, 2023, 5:42pm
5
zymotik
(Ian Brown)
December 22, 2024, 6:27pm
6
Feature request related to input_select and adding labels and values that would make the solution to your problem so much more elegant: Input_select enhancement. Support mapping - #18 by sytone