MQTT Outbound Number or Switch value in another eg. Switch


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

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 like:

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