Turns out I had a little time to look at the actual mqtt-tuya code and it really is just this code that is interpreting topics this way. It looks like it would be very easy to modify the code to have a single command topic and act instead on the message as it already does this for colors.
However, I found an even easier way to make this work for now. Following the code I noticed that the function interpreted not just command/on and command/off topic, but also command/toggle topic. While I guess this could possibly have some type of negative side effect if, for example, two things send an ON command without checking state, so an “ON” could potentially toggle the light off, but for my simple case, this is OK, and I have a strong habit of checking status before sending commands in my rules and logic anyway, so this seems good enough for me for now.
I’ll probably still take a look at updating mqtt-tuya to act on messages instead of just topics, but that probably won’t happen for a week or two.
I still have an issue with the embedded broker as it doesn’t seem to retain state during a restart even though I have a persistence file defined. Perhaps yet again this is something I just don’t understand yet, but I’ve just temporarily reverted to mosquitto for my broker while still using the 2.4 bindings.