MQTT trigger doesnt work

Ive got MQTT messages like this:

zwave/Kitchen/Remote/91/1/1 "Pressed 2 Times"
zwave/Kitchen/Remote/91/1/1 "Inactive"

and wanted them to trigger an automation:

  - id: kitchen_remote_front_garden_light_on
    alias: Kitchen remote front garden light on
    trigger:
      platform: mqtt
      topic: zwave/Kitchen/Remote/91/1/1
      payload: "Pressed 2 Times"

Unfortunatelly this automation never gets triggered. Triggering it by the service works, so the automation works fine, just doesnt trigger.
I bet it has something to do with spaces with payload, but how can i fix that?

If you use mosquitto_sub, what do you see?

The first code block i have pasted is actually from mosquitto_sub. I have checked the HA logger in debug mode and HA is also receiving same message.

I have also tried adding
encoding: ''
to the trigger block of the automation, but still doesnt work.

Looks like your device sends the double quotes in the payload.
Try it with:

      payload: '"Pressed 2 Times"'
1 Like