MQTT Switch - value_template

I think it is intuitive, did you read the docs?
So if your payload_on represents what you need, there is no need to use[value_template](https://www.home-assistant.io/integrations/switch.mqtt/#value_template)
I believe that if you define it like

value_template: >
    {"value": {{ value_json.value }}}

your switch will work.

And if you define it like this
yaml</s> <s>value_template: ></s> <s> {{ 'ON' if value_json.value == 1 else 'OFF' }}</s> <s>
there will be no need to have payload_xxx if I remember it right

EDIT: well, it will work only for displaying state of your switch in HA but it won’t let you control your relay as ON/OFF (default values) won’t be recognised (see this post for more details).