Switch for curtain Robot

Hello guys,

I build a robot which opens and closes my curtains. The robot moves left and right to move the curtain.
I want to control it by MQTT.
I found the switch.mqtt option but int only allows to turn on and off. I would need a 3rd button so that I can have it move right/left/turn off. Does anybody know how to achieve this?

Emil

You can use the mqtt.publish service to issue whatever commands you want via MQTT, you can either set up mqtt.publish as the tap action for a lovelace button, or include it in an automation (or both, if you want).