In the first post, your screenshot showed an error of
Cannot read property toString of undefined coming from the MQTT Function node that would have been caused by either
msg.payload.ambient not existing.
In your more recent post, you've shared a completely different error - "Invalid topic" coming from the MQTT publish node, and the MQTT function node no longer appears in your flow at all.
So at this point, I'm not sure what issue you want help with.
If its the Invalid topic specified error, then that will be because the MQTT node hasn't been configured with a valid topic to publish to, or you are passing in an invalid value for
Your screenshot shows the output of the DHT node - but given you've changed the flow, that's irrelevant now. It looks like its the output of the Temp node that you are passing to the MQTT node - so that would be the message we'd need to see to understand better what you are doing.