MQTT Outbound Number or Switch value in another eg. Switch

Hello,

i am trying to send some items like Switches or numbers via another switch or number like this:
project.item:

Number timerSec "time in s"
Switch sendTime {mqtt=">[mosquitto:Time:command:ON:you changed the seconds to ${timerSec}]"}

What i want to do is to make something like a formular. When i configured everything than openhab have to send by clicking a Switch the configurations.
thank you. hope you understand my problem.

You have to use a Rule and sendTime needs to be a String Item or you need to use the publish Action.

thank you for replay that fast.
sendTime should be a number which is in the sitemap and could change by the userinterface.
how does it work with the publish action?

ah okay, i understand. In the rules s.th. like:

rule "<RULE_NAME>"
when
    Item sendTime changed from ON to OFF
then
    publish(mosquitto, Time, timerSec.sendCommand(STATE))
end