I know that you can mostly use variables + template to do this, but the mqtt trigger doesn’t support templates, so I’m stuck.
I understand that blueprints do text-wise replaces, basically, so that should be possible even for triggers that need to be resolved before the automation is instantiated, like mqtt
The !input directive is handled by the YAML processor. It simply replaces !input whatever with a value and assigns it to a key.
topic: !input whatever
It won’t do anything else and won’t accept any other information that might be present before or after the directive (the + "/sensor/#" in your example).