Johnny - The "Input Mode" command is not the same thing as "Input Select" where you pick a specific input name (like DVD, HDP, SAT etc).
Think of it like plumbing -- understand the distinction between the pipes coming in (inputs on the back) and the different "faucets" that come out (logical input names). When you assign inputs you are re-routing the plumbing.
Because of the multiple inputs and flexible input assignment options, you can have multiple input types associated with a specific name. For example you can have HDMI and optical and analog RCA input sources all connected to the "HDP" input. When you select that HDP input on your receiver, it's going to default to the "highest priority" input which is HDMI. The "Input Mode" setting you quoted above allows you to re-prioritize and force the optical or analog inputs to override the HDMI input. Following the plumbing analogy, you've got three pipes coming in (HDMI, optical, analog) and one faucet (the "HDP" input name) for output, but there's a valve that controls which of the three input pipes is actually connected to the faucet. The "Input Mode" command allows you to close the valve on the HDMI input and open it on the optical or analog input pipe.
That's totally separate from selecting a different faucet (i.e. switching from the "HDP" input source name to the "SAT" or "DVD" input).
So, back to your situation -- the optical feed back from your TV's smart apps should be thought of as a separate SOURCE that has it's own "faucet" (i.e. the "TV/CBL" input name). So you do NOT need any of those fancy Harmony commands to access it, you can simply switch your receiver to the "TV/CBL" input and it's now going to expect that optical input audio source.
I circled the TV/CBL input in yellow on this back panel image: