You’ll need to create a Design Pattern: Proxy Item and a rule. Instead of creating two separate Items, one for ON and one for OFF, I’d use the publishMQTT Action in the rule to publish the message to the right topic based on whether the command was ON or OFF.
Nice, that seems to be a good solution. Thanks! Could you point me where i can create a proxy item which can be used in rules and scripts ? In OH2 i would have created a new proxy item in a .item file. In OH3 this will be possible from the UI?
An Item is an Item. Whether it’s linked to no Channels or 100 Channels is completely invisible to Rules. All it sees is the Item. If the Item is listed among the others in Settings → Items then it exists and is available like any other Item.
Thanks! Didn’t recognize, that you can not only use the 4 main categories for actions in Rules. Tried to work with “Item Action” and could not find my proxy item in the list presented.