Automation homematic device

Hi, i start with hass.io a few days ago.
I integrate zwave and homematic components via cc3.

Now i want to use the Homematic hardware button to switch the light connected to zwave.
I can switch the zwave light from gui.

So i look into log to get the id from homematic button:

2019-12-24 14:14:16 INFO (Thread-2) [pyhomematic.devicetypes.generic] HMGeneric.event: address=000193C99D4A69:1, interface_id=homeassistant-HMIP, key=PRESS_SHORT, value=True

i write down to configuration.yaml

automation test:
   trigger:
     platform: event
     event_type: homematic.keypress
     event_data:
       name: 000193C99D4A69
       channel: 1
       param: PRESS_SHORT
   action:
     service: switch.turn_on
     entity_id: switch.qubino_goap_zmnhbdx_flush_2_relays_switch

i confused about the configuration files. is it possible to write the config into configuration.yaml or should i write it to automations.yaml

automations.yaml is for automations which you have configured via the Home Assistant UI. If you want to have manual automations as well, have a look at this section of the automation editor documentation.