i have a switch node that outputs either true or false .
when it outputs true i want it to publish (cmnd/tasmota_dht11/TelePeriod 10)
and when it outputs false i want it to publish )cmnd/tasmota_dht11/TelePeriod 40)
Making a educated guess here, I presume teleperiod is the command and 10 and 40 are the value.
Try setting cmnd/tasmota_dht11/TelePeriod as the topic, and set msg.payload to 10 or 40 after the switch node, using a change node on each wire.