How to create an automation trigger with a template

In the developer tools I listen to the following event:

event_type: zwave_js_notification
data:
  domain: zwave_js
  node_id: 17
  home_id: 3237620982
  endpoint: 0
  device_id: a1a7fda19b88b3a88db8ceadc53df550
  command_class: 111
  command_class_name: Entry Control
  event_type: 2
  event_type_label: Enter
  data_type: 2
  data_type_label: ASCII
  event_data: "1234"
origin: LOCAL
time_fired: "2023-11-27T17:47:35.277607+00:00"
context:
  id: 01HG8Y9HZDGRS3S7QDHX4CMTJN
  parent_id: null
  user_id: null

I get this event when I type a pin to a RING Keypad. In this case 1234.

I think to understand, that if I want to create an automation to catch this pin, I need a trigger template. However researching trigger templates for a week now, confuses me more than it solves anything, and after many many tries I ended up with a trigger template that at least will not throw errors:

platform: template
value_template: |-
  template:
    - trigger:
       event_type: zwave_js_notification
       data:
         command_class: 111
         event_type: 2
         data_type: 2
         event_data: "1234"
         

but which does never fire.
What am I doing wrong?

You have made a mash-up of the legacy style template sensor platform and the contemporary trigger-based template sensor integration.

No, you do not need to set up a Trigger-based template sensor to trigger your automation. You can trigger an automation directly off the event.

After a week I am still totally lost and confused by the documentation to trigger an automation directly off the event
I am in Settings → Automations & Scenes → Create Automation → New Automation
There I click new trigger.
I can choose “device” or “template” but no “event”
In device all I can do is

platform: device
device_id: a1a7fda19b88b3a88db8ceadc53df550
domain: zwave_js
type: event.notification.entry_control
command_class: 111
event_type: "2"
data_type: "2"

adding a

event_data: "1234"

results in an error

The trigger at least fires on any keypresses, just not a specific one I am looking for (1234).

When delete the above code and replace it with

platform: event
event_type: "{{ 'zwave_js' ~ event.notification.entry_control }}"

at least I do not get an error, but it also never triggers

I am turning in circles :frowning:

There are 17 trigger types, only 1 has the word “event” in it…

trigger:
  - platform: event
    event_type:  zwave_js_notification
    event_data:
       command_class: 111
       event_type: 2
       data_type: 2
       event_data: "1234"

In the Automation editor this will look like:

Thank you so much for you patience!

I was put off by “manual” event, thinking this was for user events or similar…