Hopefully A simple question

So when using mqtt on the state topics you ca use a value_template to map the return values to something else for display etc, but is it possible to map a display value to something else before issuing it on a command topic?

Can you show an example please? value_template is for extracting data. Do you want to use a template for the payload?

So in this example I’m using the climate control, and I want the modes to say Auto/Manual on the display but the command to change the mode is a 0 or a 1, so if there was a way to take the Auto/Manual and map then to a 0 1 for the sending to the device?
climate:
platform: mqtt
name: Thermo
modes:
- ‘Manual’
- ‘Auto’
payload_on: ‘1’
payload_off: ‘0’
current_temperature_topic: “/broadlink/b7b57834ea34/room_temp”
target_temp_step: 0.5
temperature_command_topic: “/broadlink/b7b57834ea34/cmd/set_temp”
temperature_state_topic: “/broadlink/b7b57834ea34/thermostat_temp”
mode_command_topic: “/broadlink/b7b57834ea34/set_mode”
mode_state_topic: “/broadlink/b7b57834ea34/auto_mode”
value_template: “{% if value_json == 0 %}Manual{% elif value_json == 1 %}Auto{% endif %}”