Help with mqtt switch

Hello!

I need some help with my mqtt switch.

The device I need to start and stop does not use payloads, instead anything published to “device/set/start” starts the device and to “/device/set/stop” stops it.

So it is not the same command_topic for start and stop.

Can I make this work in home assistant?

First thing that comes to my mind is to have two MQTT switches and combine them in another template_switch or use automations to control an input_boolean.
Not the nicest solution but it’ll work.

Template switch is where I’m at too, and you might be able to do it without creating the MQTT switches if you setup the turn_on and turn_off actions to just be mqtt.publish services. The tricky part will be reading the current state of the switch - is there a separate topic for that too?

If you can’t read the current state somehow, an alternative could also be a Command Line switch, using mosquitto_pub commands for the on/off commands there.

That could work.

I can see the state on device/status/statusDescription