Event to binary sensor conversion

Hello,

I need a bit help to get the example of the documentation running.

template:
  - trigger:
      trigger: event
      event_type: my_event
    binary_sensor:
      - name: Event recently fired
        auto_off: 5
        state: "true"

My event:

I tried to change “my_event” to “press”. But this doesn’t work.

Event triggers are for actual events, not event entities (confusing, I know).
To trigger on an an event entity, you use the state platform.

See the examples at Event - Home Assistant

Thanks a lot.

Working snippet:

template:
  - trigger:
      - platform: state
        entity_id: event.button_event_z
    binary_sensor:
      - name: Event recently fired
        auto_off: 1
        state: "true"

I am missing an option to get the right event_type to get an on state at the binary_sensor only if I press once.

adding event_type: press to the trigger results in an error of misconfiguration.

Do you any working option?

event_type is an attribute of the entity, so:

  - trigger:
      - platform: state
        entity_id: event.button_event_z
    condition: "{{ state_attr(trigger.entity_id, 'event_type') == 'press' }}"