Mqtt.publish not working out of a siri shortcut

I’m trying to send a mqtt message to a device via the Shortcuts app’s “Call Service” action from the Home Assistant companion app.

Here’s a screenshot of my mini workflow:

The value of the payload key is again dictionary like this: { "name": "pvCurrPower" }.
So what I try to do here is to set the current app on one of my Ulanzi clocks running the Awtrix firmware.

I’m listening/watching the topic in MQTT Explorer but the message never arrives.

Anyone any idea what I’m doing wrong here? :flushed:

I even tried without using the Dictionary action but a simple Text action instead where I entered the JSON. I tried with escaping and without escaping quote (and other) characters – to no avail. :disappointed:

UPDATE:
I found a – strange – solution!
When I create the payload for the mqtt.publish service like in the screenshot, it works:

Very strange that in the payload dictionary the payload key’s value has to be of type “text” – when it actually is a dictionary! Very weird!!

3 Likes

I was figuring this out too. Thanks for the tip. Now mine works with dictated text as well :partying_face:

1 Like

Thanks for the tip!

1 Like