Homematic HMW-IO-12-Sw7-DR long keypress

Hi, I’m ne to HA and try to migrate from openHAB.
I have several HMW-IO-12-Sw7-DR devices where my buttons are connected to the binary sensors. I want to react to a long button press. In OpenHAB this was no problem, but in Home Assistant I just can’t get it to work. Short press works.
I have event.buro_og_taster and I’m trying it with the following code in automation.yaml:

- id: buero_og_rollladen_toggle
  triggers:
  - trigger: state
    entity_id:
    - event.lampen_steckdosen_og_2_abstellraum_og_taster_1
    attribute: event_type
    to:
    - press_long
  actions:

It works sporadically throughout the day, but most of the time it doesn’t.