It is not a hard and fast rule that a switch has to have a command. For example, my alarms are modeled as switches but are read only. When a motion alarm goes ON, a light is turned on or something else happens
EDIT: Based on what I know of your situation, I’d be tempted to link both MQTT switch channels to just one item. When the switch changes I think it would force the other channel (with the command topic) to operate the light.
I use a simple map transform to link contact channels to switches:
OPEN=ON
CLOSED=OFF
That works as expected though setting it up can a bit complicated because the UI does not allow you to do this in all situations even though it is totally fine to do that. What works is to select the channel and then link to a new item. There you can select the map transform profile and set the item type to switch. The link the new item to other channels.
How it should work?
Some time ago I tested creating item id lite SW_01_controlL_08 and create rules as:
rule "Turn SW on TST-IOT1 ON/OFF"
when
Member of BL_IOT1_SW received update
then
val swName = triggeringItem.name.split("_").get(4)
val payload = if (triggeringItem.state == ON) "1" else "0"
var jsonString = "{\"pin\":" + swName + ",\"state\":" + payload + "}"
BL_IOT1_CMD.sendCommand(jsonString)
end
But this approach needs to hardcode control logic in item ID. I don’t like this.
I prefer to create "fixed’ rule as channel link instead hardcode it in item ID or create separate rule.
I found solution for me. I have created 2 channels - one as switch, second as contact. Switch channel has property postCommand: true. I have linked switch to lightbulb item with default profile and contact profile linked to wallswitch. All works without rules. Link contact-to-wallswitch only for information.