Use JSON in webhook automation

I try to identify my doorbell ringing using a Nuki webhook. The Nuki bridge calls HA with some JSON data that I would like to evaluate in an automation.

My automation looks like this:

alias: Update Nuki
description: Update the Nuki integration by listening to a webhook request from the bridge
trigger:
  - platform: webhook
    webhook_id: >-
      xxxxxxxxxxxxxxxxxxxxxxxxxxx
condition: []
action:
  - service: homeassistant.update_entity
    target:
      entity_id:
        - lock.wohnung
        - binary_sensor.wohnung
        - lock.haustur
  - choose:
      - conditions:
          - condition: template
            value_template: '{{ trigger.json.ringactionState | string == ''true'' }}'
        sequence:
          - service: notify.mobile_app
            data:
              message: Es hat an der Haustür geklingelt
    default: []
mode: single

The webhook gets reliably called but the condition of the value_template is always false. Looking at the trace and the changed variables, I see this when the doorbell rings:

this:
  entity_id: automation.update_nuki
  state: 'on'
  attributes:
    last_triggered: '2021-09-20T12:01:54.280061+00:00'
    mode: single
    current: 0
    id: '1623055124523'
    friendly_name: Update Nuki
  last_changed: '2021-09-20T12:01:24.886957+00:00'
  last_updated: '2021-09-20T12:01:54.792608+00:00'
  context:
    id: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    parent_id: null
    user_id: null
trigger:
  platform: webhook
  webhook_id: >-
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  json:
    deviceType: 2
    nukiId: xxxxxxxxxxxxxxxx
    mode: 2
    state: 1
    stateName: online
    batteryCritical: false
    ringactionTimestamp: '2021-09-20T12:03:08+00:00'
    ringactionState: true
  query:
    __type: <class 'multidict._multidict.MultiDictProxy'>
    repr: <MultiDictProxy()>
  description: webhook
  id: '0'
  idx: '0'

So the ringactionState is present in the data but I don’t seem to be able to evaluate this against true. I’m sure I’m missing something really simple here.

Did you somehow manage to resolve your issue?

No, I haven’t

Did you try this?

          - condition: template
            value_template: '{{ trigger.json.ringactionState }}'

If the value of trigger.json.ringactionState is a boolean true then the Template Condition will be true.