Homeassistant.event how do you access data

Hi All,

Trying to work out how you access esphome event data in a HA automation.

So I’m triggering an event in esphome:

     - homeassistant.event:
        event: esphome.music_tag
        data:
          url: !lambda |-
            return id(url);

How do I access url value in home assistant? I’ve got an automation in home assistant with a trigger as follows:

    trigger: event
    event_type: esphome.music_tag
    event_data: {}

Which generates a trigger fine, but how do you access the url value in the action?

    data:
      media_content_id: '{{ trigger.event.data.url }}' 
      media_content_type: music
      enqueue: replace
    action: media_player.play_media
    target:
      entity_id: media_player.living_room

I’ve tried lots of variations of this but nothing gets the value I’m expecting. What should this look like?

Go to Developer Tools → Events and listen to the event. Share the event data here if you can’t work it out from the returned data.

Thanks, that event tool is really handy. So much easier being able to see whats being sent, or not sent (in this case!.