Tag_scanned by "person" for door open

Hi,
I have working automation with tag on my entrance doors. They are opening when I scan tag or when I click from Lovelace unlock. When Im unlocking from Lovelace in the history I can see “unlocked by name”, but when doors are unlocked via automation (from tag) then in history I can see only “unlocked”.

Could you add that feature ?

What kind of tag is it?

I have some NFC tags and I use the device_id. Maybe you can do something similar.

I have tag with ID, problem is when I calling service unlock.doors from automation - then in history is “unlocked” only. When I calling service “unlock.doors” from lovelace then in history I can see “was unlocked by name”.

The log would indicate the operation is done by the automation.

You may also be able to pass arguments as the service_data

May help if you post your automation snippet

alias: doors_tag
description: ''
trigger:
  - platform: event
    event_type: tag_scanned
    event_data:
      tag_id: xxx
      user_id:
        - 111
        - 222
        - 333
condition: []
action:
  - service: lock.unlock
    data: {}
    entity_id: lock.drzwi_wejsciowe
mode: single

What I do is something like this for the trigger

platform: event
event_type: tag_scanned
event_data:
  device_id: xNxNxnNxn
  tag_id: NxNxNxNx

You’ll have to figure out the device ID (I forgot how I did this now :frowning: ). This is tied to a person entity