How to automate based on an event's data?

I installed ESPHome on a Sonoff RF Bridge, which results in events being raised when there is activity on the device (please let me know if more details are needed; this was just to set the context)

Specifically, I see the following event in DevTools:

event_type: esphome.sonoff-rf-bridge-1_hex
data:
  device_id: 8e5836227e24916e2857fc52826b866f
  sync: 235a
  low: 012c
  high: "0398"
  code: 007a9388
origin: LOCAL
time_fired: "2025-10-10T12:35:35.512552+00:00"
context:
  id: 01K771X5YRE7WMC5ADMX1NVV49
  parent_id: null
  user_id: null

I wanted to make an automation that would trigger when the above event appears, specifically with this code (hex 007a9388)

I started to build the automation in the GUI, which results in this YAML version:

alias: dock station
description: toggle dock station + monitor
triggers:
  - trigger: event
    event_type: esphome.sonoff-rf-bridge-1_hex
    event_data:
      data:
        code: 007a9388
conditions: []
actions:
  - type: toggle
    device_id: da626a2bd349400f93e5be4b4bb69863
    entity_id: d2c87a467fc9c50ceaf4c203737e60f0
    domain: light
mode: single

The problem: it never triggers.

I found the issue (and I am keeping the answer in case someone has the same problem).

data is redundant; it is enough to directly use code:

triggers:
  - trigger: event
    event_type: esphome.sonoff-rf-bridge-1_hex
    event_data:
      code: 007a9388