Failed to trigger automation with event

alias: event_test
description: ''
trigger:
  - platform: event
    event_type: entity_registry_updated
    context:
      user_id:
        - e87c94f35b2244cbb0d262ca327d2156
condition: []
action:
  - service: mqtt.publish
    data:
      topic: /event/test
      payload_template: '{{ trigger.event.data }}'
mode: parallel
max: 20

When I add a device, the automation is not triggered,but when I use Develop tools to listen to this event, I can get info.
When I use Develop tools to fire this event manually, the automation is triggered.


I don’t know why?plz help me,thanks!

The user_id is null. Did you want the id instead?

thank so much!
I delete user_id and it works!

1 Like