Zha_event trigger not working

Ok so this is my first time playing with event triggers so my assumption if I’ve done something incorrect but im pulling my hair out trying to find it.

I have a simple zigbee button. I have used developer tools to find they eve t data for when it’s pressed.

I copy the event data into a manual event trigger for an automation.

The event does fire but for some reason. The automation doesnt trigger. Anyone piint where I’ve messed up?

Here is the yaml

alias: Light test
description: “”
triggers:

  • trigger: event
    event_type: zha_event
    event_data:
    event_type: zha_event
    data:
    device_ieee: a4:c1:38:e6:6b:54:c2:df
    device_id: ca616657ea373c80db8a81d55ccca9df
    unique_id: a4:c1:38:e6:6b:54:c2:df:1:0x0006
    endpoint_id: 1
    cluster_id: 6
    command: toggle
    args:
    params: {}
    origin: LOCAL
    time_fired: “2025-12-03T14:05:52.446038+00:00”
    context:
    id: 01KBJ8H9XYFENG5PS1K60MX3Q0
    parent_id: null
    user_id: null
    conditions:
    actions:
  • type: turn_on
    device_id: 58df98918a88a07025dba6334cd2287b
    entity_id: ab8338564800ea5d30f9737b938a3998
    domain: light
    brightness_pct: 100
    mode: single

Hello Andrew,

Thanks for coming here and asking a question.
Would you be so kind as to adjusting the format of your code so that we can read it properly & check the YAML spacing, etc. Editing your original is the preferred way. It is very hard for us to tell what is what when the text formatter jumbles everything like that.
You can use the </> button like this… How to format your code in forum posts
OR… Here is an example of how to fix formatting from the site FAQ Page.
How to help us help you - or How to ask a good question.

Assuming the YAML is correctly formatted…

You’ve simply copy-pasted the whole event object under event_data, which is not how it should be done.
By doing so you’ve made the trigger require data it will never contain and data that is too specific.

  • The data component that event_data checks will never contain an entry of event_type: zha_event.
  • The trigger can’t require a time_fired value that is in the past and be expected to trigger in the future.

The only two data points you should need are the device id and command:

  - trigger: event
    event_type: zha_event
    event_data:
      device_id: ca616657ea373c80db8a81d55ccca9df
      command: toggle

this was it thank you