Controlling SmartThings TV with custom app to send 2 commands?

I’m new to this so apologies if this is all documented somewhere.

I have a Samsung Sero TV (the one that has a Portrait mode). The TV switches off to Portrait mode (which I want) but in order to switch it on and then to Landscape mode (to watch TV) I have to do this with a remote:

  1. Switch on TV
  2. Press ‘Rotate’ (either on a Bluetooth remote, via the SmartThings App as the TV shows up, or ask Bixby on TV)

What I want to do is use some automation so that I can do this in a single command (with ultimate goal of integrating into some way of triggering via voice).

The Rotate button is only available on the Bluetooth remote so I can’t IR learn, also Automations in the SmartThings app doesn’t offer ‘Rotate’. So this got me thinking if I could do this via some convoluted setup where I can use SmartThings custom code to send commands to the TV.

Is there a way I can create a custom app that will send commands to the TV ? Also, is there a way to query what commands are available (call me a cynic but I would suspect it isn’t a simple ‘Rotate’ !).

Thanks in advance, CraigS