[mqtt] How to send an empty payload correct?

To get a state update from tasmota devices, the easiest option is to send an empty payload to the command topic and tasmota will answer with the current state at the corresponding state topic, e.g.

rule "mqtt states holen"
    Item myRefresh received command ON
    val mqttActions = getActions("mqtt","mqtt:broker:mosquitto")
        mqttActions.publishMQTT("cmnd/tasmotas/POWER", null, false)

VS Code openHAB plugin complains about an Ambiguous feature call:

Ambiguous feature call.
The extension methods
	publishMQTT(ThingActions, String, byte[], Boolean) in MQTTActions and
	publishMQTT(ThingActions, String, String, Boolean) in MQTTActions
both match.(org.eclipse.xtext.xbase.validation.IssueCodes.ambiguous_feature_call)

which is correct :slight_smile: obviously both methods match, but how to avoid this warning?

Send an empty string: "".

It might work to cast the null to a String but that would be very weird and I cannot guarantee that it would work. null as String.

Note, sending an empty string with the retained flag set to true also works to clear out the previously retained message on the topic.