Please supply a flow with inject nodes with different payloads. Its hard giving answers when not given all information.
Add a json node before , it will turn your json into object. The mqtt node will accept a object and will convert it.
e.g.
[{"id":"6b54e3a77601e9cd","type":"inject","z":"452103ea51141731","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"HeatingUpstairs\":{\"RSSI\":-57,\"LQI\":49,\"Battery\":2650,\"State\":1,\"Flags\":0,\"Measured\":21.12,\"Required\":21.50}}","payloadType":"str","x":170,"y":4880,"wires":[["863a8ee7cebd3eae"]]},{"id":"863a8ee7cebd3eae","type":"json","z":"452103ea51141731","name":"","property":"payload","action":"","pretty":false,"x":330,"y":4820,"wires":[["a59d84a3ff440f70"]]},{"id":"065f5aa0712a3e9f","type":"inject","z":"452103ea51141731","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"HeatingUpstairs\":{\"RSSI\":-57,\"LQI\":49,\"Battery\":0,\"State\":0,\"Flags\":0,\"Measured\":21.12,\"Required\":21.5}}","payloadType":"str","x":170,"y":4940,"wires":[["863a8ee7cebd3eae"]]},{"id":"a59d84a3ff440f70","type":"switch","z":"452103ea51141731","name":"","property":"true in [$$.payload.HeatingUpstairs.Battery, $$.payload.HeatingUpstairs.State, $$.payload.HeatingUpstairs.Flags].($!=0)","propertyType":"jsonata","rules":[{"t":"true"}],"checkall":"true","repair":false,"outputs":1,"x":470,"y":4820,"wires":[["fc8bbccf27983eb1"]]},{"id":"fc8bbccf27983eb1","type":"debug","z":"452103ea51141731","name":"debug 234","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":570,"y":4900,"wires":[]}]
Why not export an object from the function?