Listening to mqtt events with a partial payload

I am getting the following events from my https://www.zigbee2mqtt.io/devices/E1766.html

 Message 3 received on zigbee2mqtt/0x588e81fffe2b659c at 9:46 PM:

{
    "action": "close",
    "battery": 87,
    "linkquality": 207,
    "update_available": false
}

QoS: 0 - Retain: false
Message 2 received on zigbee2mqtt/0x588e81fffe2b659c at 9:46 PM:

{
    "action": "open",
    "battery": 87,
    "linkquality": 207,
    "update_available": false
}

QoS: 0 - Retain: false

I created the following automation for it

- id: '1606163832212'
  alias: OpenBlinds
  description: ''
  trigger:
  - platform: mqtt
    topic: zigbee2mqtt/0x588e81fffe2b659c
  condition: []
  action:
  - service: mqtt.publish
    data:
      topic: zigbee2mqtt/0x680ae2fffefe7819/set
      payload: '{ "position": 100 }'
  mode: single

This works, and the blinds will open on any button press. Now I would like to only listen for a specific payload like "action": "open", and "action": "close". Is that possible? I can’t hardcode the full payload because it contains linkquality/battery which changes after every press.

Is there a way to extract only the action field from the payload? I tried payload: '{ "action": "open" }' but that doesn’t seem to work.

It seems that I might need to use a value template for it, but the docs are not really clear in that regard.
~

Take a look at the json stuff https://www.home-assistant.io/integrations/sensor.mqtt/

I am not sure the docs actually tell me how to extract a variable. They say I can use the value_template to extract the field, but not how to use it.
Intuitively I’d write something like this

- id: '1606163832212'
  alias: OpenBlinds
  description: ''
  trigger:
  - platform: mqtt
    topic: zigbee2mqtt/0x588e81fffe2b659c
    value_template: "{{ value_json.action }}"
    payload_available: "open"
  condition: []
  action:
  - service: mqtt.publish
    data:
      topic: zigbee2mqtt/0x680ae2fffefe7819/set
      payload: '{ "position": 100 }'
  mode: single

But I get

Message malformed: extra keys not allowed @ data['value_template']

from the automation editor.

Still not really sure how to do it, but if you set homeassitant = true in zigbee2mqtt it will setup everything for you.