Help for Automation for notification about a new device (nmap device tracker)

What I have already: Basically I’m using the code from here

This is working fine, however I want to show the following additional information which is not available in the entity_registry_updated event, so I would have to access the entity of the device tracker domain somehow for this information:

  • Hostname
  • Mac

Has anyone any idea how I could get this working?

alias: New Device
description: ''
trigger:
  - platform: event
    event_type: entity_registry_updated
condition:
  - condition: template
    value_template: '{{trigger.event.data.entity_id.split(''.'')[0] == ''device_tracker'' }}'
action:
  - service: notify.notify
    data:
      title: New device joined Network
      message: >
        New device tracked: ({{trigger.event.data.entity_id}}) Host:
        {{trigger.event.data.host_name}} Mac-address: {{trigger.event.data.mac}}
mode: single