mqtt: switch: - name: 'relay11' unique_id: relay11 state_topic: 'relay32/80f9caa4068e78059e31c622/state' command_topic: 'relay32/80f9caa4068e78059e31c622/set' payload_on: '{"relay1":{"on":1}}' payload_off: '{"relay1":{"on":0}}' value_template: '{{ value_json.relay1.on }}' state_on: 1 state_off: 0