Nice work figuring it out - took me a bit as well. Had to use the logs / entity registry to get mine to work correctly. Anyhow, going to paste my working code here as well for anyone else’s future reference of how to use the device_id to ‘listen’ for button pushes.
From my automations.yaml:
- id: '1556158361659'
alias: Front Gate Button
trigger:
- event_data:
device_id: 4c503d98-0bb5-4e14-93f3-33bf91066131
value: pushed
event_type: smartthings.button
platform: event
condition: []
action:
- data:
entity_id: switch.front_drive_gate
service: switch.toggle