Send Json string to MQTT without transformation

I need to send a Json message to MQTT
I do not get the Json transformation to work, and I will be sending static commands so I do not really need the transformation.

My plan was to put the Json command this in a rule:


There are to many " signes in that command, is there some way to solve that?

HP_Publish item is:

String HP_Publish							    "Heat Pump Publish"			{ mqtt=">[broker_no_Retain:home/heatpump/set:command:command:*:default]" }

Is it at all possible to use this code to send the MQTT Json?

Wrap the whole string in single quotes '


Or escape the quotes with a backslash \

1 Like