Event should fire because of defined mqtt payload string

Hi there,
i’m new in mqtt…
i want to perform the action ONLY, when the Payload-String starts with “3,”

i have tried it like the example below or with conditions.
Nothing works, because the event fires the whole time when a message is incoming.

Someone any idea?

Thanks a lot
regads
Daniel

alias: tur
description: ""
trigger:
  - platform: mqtt
    topic: blub/3678556C/Feier
    encoding: utf-8
    payload: "{3,}"
condition: []
action:
  - type: turn_on
    device_id: ab9f7542c4a9831b49bb71eef4512c3e
    entity_id: a317e96d1cc07313e1bbe5f455be3f92
    domain: switch
mode: single

i have also tried this:

condition:
  - condition: template
    value_template: trigger.payload.startswith("3,")

and this is the mqtt message:

mqtt_packet_received, packet: PUBLISH(Q2, R0, D0, Topic=blub/3678556C/Feier, PacketId=29, Payload=3,0,1357381632,0,0)

something like

alias: tur
description: ""
trigger:
  - platform: mqtt
    topic: blub/3678556C/Feier
    encoding: utf-8
condition:
    value_template: '{{ trigger.payload is match "3," }}'
action:
  - type: turn_on
    device_id: ab9f7542c4a9831b49bb71eef4512c3e
    entity_id: a317e96d1cc07313e1bbe5f455be3f92
    domain: switch
mode: single

your code returns: “Message malformed: Unexpected value for condition: ‘None’. Expected and, device, not, numeric_state, or, state, sun, template, time, trigger, zone @ data[‘condition’][0]”

Yes, forgot template

alias: tur
description: ""
trigger:
  - platform: mqtt
    topic: blub/3678556C/Feier
    encoding: utf-8
condition: template
    value_template: '{{ trigger.payload is match "3," }}'
action:
  - type: turn_on
    device_id: ab9f7542c4a9831b49bb71eef4512c3e
    entity_id: a317e96d1cc07313e1bbe5f455be3f92
    domain: switch
mode: single

now other return code:

Message malformed: required key not provided @ data['condition'][0]['value_template']

Then I don’t know
image

a litte bit crazy but when it is escaped, it works:

condition:
  - condition: template
    value_template: "{{ trigger.payload is match \"3,\" }}"